Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
pbijack93
Frequent Visitor

Dynamic Variance between Figures

I've used PARRALLELPERIOD for MONTH, to get FTE difference between the previous month.

 

However I have to do another for YEAR, QUARTER etc.

 

Is there any way at all to do with dynamically with EARLIER. 

 

So I can have 1 variance figure on a matrix table or a graph, but I can drill down. So the year differential will be shown, but drill into the months and the differential will be shown between them too. 

 

Any help or advice? Thank you.

 

I have a date table, relationship to a cycle date on the fact table, which also has FTE value. 

 

 

5 REPLIES 5
pbijack93
Frequent Visitor

@Greg_Deckler any thoughts, thank you 

Greg_Deckler
Super User
Super User

@pbijack93 You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler thank you 🙂

 

The below shows you so far - Month_Var has the following DAX: 

 

 

FTE_Prev_Mnth = 
CALCULATE(
    [FTE_Demand],
    PARALLELPERIOD(
        Date_Dim[Date],
        -1,
        MONTH)
)

 

 

 

However - how can i make this dynamic, for example not always a period of -1 , say if i selected april-24 and july-24 , id like to see the difference between them two months. 

 

And also - say if i drill up on the matrix , can Month_Var for example show the difference between the years, all within one measure/column.

 

Ive tried with the dynamic one - thats just totalling each months FTE total without a filter and comparing to itself, however I thought I was on the correct lines... Seems not!!

 

 

Dynamic FTE_Demand Difference = 

var dt =SELECTEDVALUE(Fact_IBP_Data[Cycle_Date])
var min_dt = CALCULATE(MIN(Fact_IBP_Data[Cycle_Date]),Fact_IBP_Data[Cycle_Date]>dt)
var val = CALCULATE(SUM(Fact_IBP_Data[FTE]),Fact_IBP_Data[Cycle_Date]=min_dt) - SUM(Fact_IBP_Data[FTE])
return val

 



table example.PNG

@pbijack93 Yeah, my advice is to not use DAX TI functions, they are not flexible or intuitive. Better to do it with just good old FILTER function.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thank you - ive been playing with variables and filters - but the result then gives me everything in two columns on the matrix.

Would you be able to provide me with an example that i can build off using my data please? Id be really grateful.

 

Thank you 

pbijack93_0-1714574957225.png

 

 

Jack

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.