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.
Hi all,
In my report, i have calculated
Previous month sales = CALCULATE(SUM(Order_Details[Sales]),FILTER(ALL(Order_Details[Month num]),Order_Details[Month num]=MAX(Order_Details[Month num])-1))
Current month sales = CALCULATE(SUM(Order_Details[Sales]),FILTER(ALL(Order_Details[Month num]),Order_Details[Month num]=MAX(Order_Details[Month num]))).
I have included a table visual for these sales.
When i am using Month name as slicer and if i select one month name, the previous month sales is not appearing. Only when i select two month names, i am getting the previous month sales. This is one scenario.
When i am using Month num as slicer and if i select one month num, i am getting the previous month sales.
In my case, i need month name as slicer and if i select one month name, the previous month sales should appear in the table.
I couldn't use Month name in the DAX formula
Solved! Go to Solution.
It doesn't show the previous month because we did not specify the year.
Please see attached pbix
Or you can transform your date in query editor and extract moonth number and month name and use your extracted month num to code and usethe extracted month as slicer.
I have added the Month name and month num by extracting from date.
Using Query Editor? If so, please share a pbix to reproduce the issue
It doesn't show the previous month because we did not specify the year.
Please see attached pbix
Please share PBIX file. If your data is confidential, pls provide a dummy
can you share PBIX File
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 |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |