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

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.

Reply
Cmuglioni
Frequent Visitor

SUMX returns blank comparing with previous year

Hi everyone,

 

I am relatively new to power Bi and DAX. I am actually working on a financial report in order to show the impact of the change in sales regarding the volume, price and mix of my products.

 

I managed to do it at a global level and now I am struggling with the same report per client. My problem is when I don't have sold the same product this year versus previous year. The SUMX function returns blank in the last column:

 

Sin título.png

 

I already tried to change blank cells to 0 but it didn't work. I also tried with ISBLANK, with IF(ISBLANK())... without any adicional results. I think it might come from the fact that in my table "softland_iw_gmovi[Products]" I don´t have, for the current year, these products in my sales database.

 

The SUMX function:

=Sumx(Values(softland_iw_gmovi[Productos]);[PPC N-1]*([Cajas]-[Cajas N-1])-[Efecto Mix N-1])
 
 

Thankful for any tips or insights!

 

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Are you using a date table for the previous year calculation?

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.

Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

Are you using a date table for the previous year calculation?

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.

Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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