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 am using TotalMTD to SUM up sales per month.
It works great at the day level as it sums each day's sales up to the month to date total.
However, for the entire grand total I want YTD not the value of the most recent month in the year:
How do I adjust my measure so that when at the grand total level for year it shows 610 (all 4 months added) instead of 180 which is the MTD value of the most recent month?
Thanks!
Solved! Go to Solution.
Hey @OneWithQuestion,
You can achieve this by using the HASONEFILTER function, because the row data will contain a filter and the grand total will not. Your measure will look something like:
RealMonthlySum = IF( HASONEFILTER(Table1[Date]), TOTALMTD(SUM(Table1[SalesAmount]), Table1[Date]), SUM(Table1[SalesAmount]) )
If you want further explanation, you can watch a video tutorial I posted here.
Hope this helps,
Parker
Hey @OneWithQuestion,
You can achieve this by using the HASONEFILTER function, because the row data will contain a filter and the grand total will not. Your measure will look something like:
RealMonthlySum = IF( HASONEFILTER(Table1[Date]), TOTALMTD(SUM(Table1[SalesAmount]), Table1[Date]), SUM(Table1[SalesAmount]) )
If you want further explanation, you can watch a video tutorial I posted here.
Hope this helps,
Parker
Thank you, HasOneFilter was perfect! I was playing around with HasOneValue but the filter is so much more versitile.
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |