Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a dashboard with a slicer to select the period (1 or 2) and the year. You can make two selections in this slider, so for example 2 2023 and 1 2024. In that dashboard I have the following table:
Name Period Year Period-Year-code Value Change
Item 1 2 2023 2 25
Item 1 1 2024 3 15 Lower
So what I'm looking for is the change value that is in the last column. For every selection you make in the slicer there will be two results with the same name, only the period-year-value are different. Im struggeling to come up with a logic that would work for this. Hopefully anyone has an idea how to calculate this. Thanks!
Solved! Go to Solution.
@Roym , If you have date or create date using year and month
Date = Date([Year], [Month], 1)
Join with Date of date table and use time intelligence
then you can have measure like that have diff measure
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])
Or you can measure based on min and max selected
Mtd =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = eomonth(_max,-1)
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max) )
LMtd =
var _max = eomonth(maxx(allselected('Date'),'Date'[Date]),-1)
var _min = eomonth(_max,-1)
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max) )
or you can use two slicer
Power BI How to use/compare two Date/Period slicers: https://youtu.be/WSeZr_-MiTg
@Roym , If you have date or create date using year and month
Date = Date([Year], [Month], 1)
Join with Date of date table and use time intelligence
then you can have measure like that have diff measure
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])
Or you can measure based on min and max selected
Mtd =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = eomonth(_max,-1)
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max) )
LMtd =
var _max = eomonth(maxx(allselected('Date'),'Date'[Date]),-1)
var _min = eomonth(_max,-1)
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max) )
or you can use two slicer
Power BI How to use/compare two Date/Period slicers: https://youtu.be/WSeZr_-MiTg
Perfect thanks! I was able to figure it out with your explanation.
User | Count |
---|---|
83 | |
69 | |
68 | |
65 | |
53 |
User | Count |
---|---|
94 | |
92 | |
91 | |
77 | |
70 |