We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hey, everyone, I've been trying to calculate this, but I'm really stuck. Here is the problem:
I want to show in % the difference between months of 2016 and 2017. For example :
January 2016: 10
January 2017: 11
% diff: +10%
Thanks in advance 😄
Hi,
If the following conditions are met
then, this measure will work
=SUM(Data[Value])/CALCULATE(Data[Value]),PREVIOUSMONTH(Calendar[Date]))
Hope this helps.
Hi @nzboan,
You can use below formula to calculate the diff between current year month total and previous year month total.
Measure:
Diff =
VAR CYM =
CALCULATE (
SUM ( Records[Amount] ),
FILTER (
ALLSELECTED ( Records ),
YEAR ( [Date] ) = YEAR ( MAX ( [Date] ) )
&& MONTH ( [Date] ) = MONTH ( MAX ( [Date] ) )
)
)
VAR PYM =
CALCULATE (
SUM ( Records[Amount] ),
FILTER (
ALLSELECTED ( Records ),
YEAR ( [Date] )
= YEAR ( MAX ( [Date] ) ) - 1
&& MONTH ( [Date] ) = MONTH ( MAX ( [Date] ) )
)
)
RETURN
DIVIDE ( CYM - PYM, PYM, 0 )
Regards,
Xiaoxin Sheng
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 33 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 40 | |
| 34 | |
| 25 |