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 a query could you pls help me to get this sorted. Have a slicer where it contains month as 22-08, 22-09, 22-10, 22-11, 22-12. Based on the slicer value selection I have to always get previous month data in the card.
I tried using this measure but it only gives previous month data that is Nov month only but when I select 22-11 it should show Oct month data in the card.
Could you pls help me to get this sorted.
@lbendlin I have tried using PREVIOUSMONTH function but dint get any data instead got Blank.
Slicer is in Year-month format (22-10). Used below measure, could you pls help me to correc it. Thanks in advance.
NGRReport[createdon] is in 08/26/2022 format which is been used in the measure & the slicer value is 22-10.
User wants the slicer to be in 22-10 format itself.
Sounds like your data model is missing the calendar table? These functions require a correctly set up and linked calendar table.
I have the Calendar table linked with NGRReport table which is been used in the measure.
I tried taking Created month column as slicer value in date format & got the expected results using PREVIOUSMONTH. But one issue is when the slicer is selected as ALL it shows same values in current month, overall report generated & blank in previous month card.
Could you pls help how to sort this.
Always the slicer selection should be as ALL & there are other visuals in the report to show data as Overall.
When you set Created Month to "All" the concept of a previous month no longer applies. Rethink what you are trying to achieve.
Ok got it thanks.
The measure which I used to get previous month data doesnt show correct data. Could you pls help me on this.
Measure used -
Supposed to get 63 in place of 10 here
I have Date table as well in model & connected.
Slicer created on is date column from NGRReport
Change your PREVIOUSMONTH function to use the date from the calendar table.
You must use YearMonth format, and you cannot do math like that. MONTH(TODAY())-1 will fail in January.
Use PREVIOUSMONTH or DATEADD built-in functions.
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.