Forum Discussion
Calculate Threshold Analysis
- 3 years ago
Step 1 - Transform your Month only column to a full date.
- Sep 2022 becomes 9/1/2022.
- Feb 2023 becomes 2/1/2023
This is easily done in Power Query Editor.
Step 2 - Also in Power Query Editor, select all the month columns & unpivot them so that instead of a separate column for each month-year, you now only have 1 column for "Date" & 1 column for "Value" (or whatever you want to rename it).
Step 3 - In the model, create the 1:* relationship between 'Date'[Date] & 'Data'[Date]
Step 4 Create a new measure called _B4PrevMONTH V2 .
This resolves the issue of (2 - 2 = 0) the invalid month number.
You can upload a PBIX to Google Drive, make it public & then share the link here on forums.
This should resolve the issue with your blank values for the "2 months ago" measure.
Regards,
Nathan
Step 1 - Transform your Month only column to a full date.
- Sep 2022 becomes 9/1/2022.
- Feb 2023 becomes 2/1/2023
This is easily done in Power Query Editor.
Step 2 - Also in Power Query Editor, select all the month columns & unpivot them so that instead of a separate column for each month-year, you now only have 1 column for "Date" & 1 column for "Value" (or whatever you want to rename it).
Step 3 - In the model, create the 1:* relationship between 'Date'[Date] & 'Data'[Date]
Step 4 Create a new measure called _B4PrevMONTH V2 .
This resolves the issue of (2 - 2 = 0) the invalid month number.
You can upload a PBIX to Google Drive, make it public & then share the link here on forums.
This should resolve the issue with your blank values for the "2 months ago" measure.
Regards,
Nathan
- DEMDEJ3 years agoFrequent Visitor
WinterMist Thanks so much for being such a great help! Do you mind sharing recommendations for becoming better at PowerBI?
You are AWESOME!
- WinterMist3 years agoImpactful Individual
You are welcome. Thanks for the kind words.
For improving in DAX, check the following thread:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/How-to-learn-DAX-from-beginning-to-Advance/m-p/2586316#M74389 Regards,
Nathan