Forum Discussion
Dynamic Variance between Figures
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
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.
- pbijack932 years agoFrequent Visitor
@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
Jack