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.
Hello! I have a P&L statement that allows users to go back in time to filter data based on a specific month end, then show MTD, YTD and Prior YTD totals as of that date. As an example, I have a user select a filter of MONTH END, and they set it as "on or before" 9/30/2020. Today is April 16th. I have a join between my GL tables (MONTH END DATE) to my SQL Server Time table (CALENDAR DATE).
Well the net totals of the DAX calculation below (1-9) are correct for each of the categories, but I am bringing in data from months other than 9/30/2020 in my MTD column which is representing months other than 9/30/2020. If I filter for MONTH END "IS" 9/30/2020 everything is fine, but my YTD and PYTD are now off. So how can I fix this? The user could go back to say 11/30/2018 if they wanted. And they filter on Month End, not a GL posting date. So today they would set a filter of April 30, 2021.
BTW - I get the MTD to work if I hard code the Month (September) and Year (2020) into the FILTER below. I also need that SWITCH command as well.
Thanks in advance.
Solved! Go to Solution.
I think I got it working using the calculation below. Notice the filter.
@Razorbx13 , Not very clear. Is this a date table and marked as date table in power BI
,'Time (GL Month End)'
Also, calculation group might be a better solution for this
https://www.youtube.com/watch?v=vlnx7QUVYME
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/
I think I got it working using the calculation below. Notice the filter.
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |