Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Piu
New Member

Not getting categories present in previous month but not in present month

Piu_0-1745688711658.png

I was trying to calculate the productivity of previous month but I m not getting all the categories which are present in previous month but not in current month.

the 2 measures which I have used to calculate it is mentioned below

Total_Productivity =
IF (
    [New_Dwg] <> 0,
    DIVIDE([Total MH], [New_Dwg])
)
_prev_Productivity = If ([New_Dwg] <> 0,
 Calculate([Total_Productivity],PREVIOUSMONTH('Date'[Date])))
Please help me how to solve this problem
2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

That is something you usually do via EXCEPT.

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

v-tsaipranay
Community Support
Community Support

Hi @Piu ,

Thank you for reaching out to the Microsoft Fabric Community.

 

To calculate the categories that are present in the previous month but not in the current month, you can use DAX to compare the data from both months. You can use the EXCEPT function to identify categories that exist in the previous month but are missing in the current month. Ensure that your PREVIOUSMONTH function is correctly applied to your measures and that the conditions in your IF statements are set appropriately for accurate calculation.

 

If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

 

Thankyou.

View solution in original post

5 REPLIES 5
v-tsaipranay
Community Support
Community Support

Hi @Piu ,

 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

 

Thank you.

v-tsaipranay
Community Support
Community Support

Hi @Piu  ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


Thank you.

v-tsaipranay
Community Support
Community Support

Hi @Piu ,

Thank you for reaching out to the Microsoft Fabric Community.

 

To calculate the categories that are present in the previous month but not in the current month, you can use DAX to compare the data from both months. You can use the EXCEPT function to identify categories that exist in the previous month but are missing in the current month. Ensure that your PREVIOUSMONTH function is correctly applied to your measures and that the conditions in your IF statements are set appropriately for accurate calculation.

 

If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

 

Thankyou.

Hi @Piu  ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


Thank you.

lbendlin
Super User
Super User

That is something you usually do via EXCEPT.

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.