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.
I have two slicers :
I want to calculate the total of product with the date_sold between the year selected and the month selected
and the last year the same month.
Example :
Current selection :
month : january
year : 2022
the range : january 2021 - january 2022
The measure of count is simple : CountProducts = COUNT(FCT_Table[ProductID])
Solved! Go to Solution.
YourMeasure=
CALCULATE(COUNT(FCT_Table[ProductID])
DATESINPERIOD(FCT_Table[date_sold],
LASTDATE(FCT_Table[date_sold]),-12, MONTH),
USERELATIONSHIP(dim_calendrier[id],FCT_Table[date_sold]))
YourMeasure=
CALCULATE(COUNT(FCT_Table[ProductID])
DATESINPERIOD(FCT_Table[date_sold],
LASTDATE(FCT_Table[date_sold]),-12, MONTH),
USERELATIONSHIP(dim_calendrier[id],FCT_Table[date_sold]))
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |