Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
To calc the variance between current vs previous month amounts, I use this formula:
AdsPromo Var = if([AdsPromo LM] = BLANK(), 0,
[AdsPromo]-[AdsPromo LM])
For Feb17, the AdsPromo Var amount is still 0 using the above formula when it should be 464 (464-0). Kindly advise on how resolve the error in the measure/DAX.
Tks: -Nik
Solved! Go to Solution.
Hi @Anonymous ,
Assuming that your source table is similar to below -
If you are looking for a measure, use below DAX query -
AdsPromo Var =
VAR current_Month =
CALCULATE ( SUM ( 'Table'[AdsPromo] ) )
VAR previous_Month =
CALCULATE ( SUM ( 'Table'[AdsPromo] ), PREVIOUSMONTH ( 'Table'[Month-S] ) )
VAR AdsPromoVariance = current_Month - previous_Month
RETURN
AdsPromoVariance
The Month-S column should be the date type.
Here is the output
Regards,
Nandu Krishna
Thanks, @nandukrishnavs .
All is good.
In fact, I have also managed to create the variance percentage subsequently.
KRgds: -Nik
Hi @Anonymous ,
Assuming that your source table is similar to below -
If you are looking for a measure, use below DAX query -
AdsPromo Var =
VAR current_Month =
CALCULATE ( SUM ( 'Table'[AdsPromo] ) )
VAR previous_Month =
CALCULATE ( SUM ( 'Table'[AdsPromo] ), PREVIOUSMONTH ( 'Table'[Month-S] ) )
VAR AdsPromoVariance = current_Month - previous_Month
RETURN
AdsPromoVariance
The Month-S column should be the date type.
Here is the output
Regards,
Nandu Krishna
Thanks, @nandukrishnavs .
All is good.
In fact, I have also managed to create the variance percentage subsequently.
KRgds: -Nik
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |