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.
Any ideas on how to get a monthly sum (decided by a Slicer selection) and a yearly sum (to the selected month on Slicer) to display on a table visual?
I have a Fact Table and Date Table, linked by Date.
Fact:
Location
Item
Date
Quantity
Date:
Date
Month
Year
My slicer is coming from the Date Table.
I attempted using the following measures:
[Month Quantity] = CALCULATE(SUM(Fact[Quantity]),FILTER(Fact,Fact[Item]=Fact[Item]&&Fact[Location]=Fact[Location]))
[Yearly Quantity] = CALCULATE([Month Quantity],ALL(Date[Month])
**Note: I also tried using the ALL function to filter by Month in the Fact table (ie: [Yearly Quantity] = CALCULATE([Month Quantity],ALL(Fact[Month]))
These result in the same value being displayed in my Table visual. I want to display these measures by Location and Item, hence the Filter function used in the [Month Quantity] measure. Any insight would be appreciated.
Solved! Go to Solution.
Hi,
Select a Year and Month in the 2 slicers that you have created from the Date Table. Write these measures
Quantity = SUM(Fact[Quantity])
YTD Quantity = CALCULATE([Quantity],DATESYTD('Date'[Date]))
Hope this helps.
Hi,
Select a Year and Month in the 2 slicers that you have created from the Date Table. Write these measures
Quantity = SUM(Fact[Quantity])
YTD Quantity = CALCULATE([Quantity],DATESYTD('Date'[Date]))
Hope this helps.
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 |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |