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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Calculate matrix difference with blank data

Hello, please I require your help I need that the data that appear in white appear in 0, and that it generates the difference in the difference column because currently the cases where the cell is empty is not considering it for the difference, I send screenshot of the measurements, if you can help me with the code, Please.

ArimaKousei_5-1658291056368.png

ArimaKousei_1-1658290742450.png

ArimaKousei_2-1658290763481.png

ArimaKousei_3-1658290790578.png

1 ACCEPTED SOLUTION

Ready friend, I already solved it, the error came from the measures where I calculate the differences, I need to add the ALSELLECTED function within the MAXX and MINX function at the time of declaring the variables. And in the measure of difference add the +0 for when there is no data.

https://drive.google.com/file/d/1KP4kGJo6qQNyhgNhVlrzv3ZdJtnx0Okc/view?usp=sharing

ArimaKousei_0-1658381438916.png

ArimaKousei_2-1658381523822.png

ArimaKousei_3-1658381565727.png

ArimaKousei_4-1658381591994.png

View solution in original post

4 REPLIES 4
MahyarTF
Memorable Member
Memorable Member

Hi,

In my point of view, maybe there is Null value and it is not calculated in your measure, up + 0 after each calculation statement.

If it is not fixed, need to have your PBIX file for investigation 

Mahyartf

I have not been able to identify the fault, I attach the .pbix file in the following link

https://drive.google.com/file/d/1sq8im63QNXdWnNPKZ5Qm4faUXShGGKud/view?usp=sharing

I need to fill the empty spaces with 0, and that I can make a difference.

Hi,

In your measure, I just add the '+ 0' to the script and now there isn't any null value, but the issue is not because of the null value.

As I marked below pic, you compare the dates together in separate tables, and according to the Filter Dax code, there is just one record in each table to calc (one for 202206) and others is for 202205 and never comes in your dax.

MahyarTF_0-1658371661796.png

I think you need to change your Dax codes and compare other column(s) or do in another ways

Mahyartf

Ready friend, I already solved it, the error came from the measures where I calculate the differences, I need to add the ALSELLECTED function within the MAXX and MINX function at the time of declaring the variables. And in the measure of difference add the +0 for when there is no data.

https://drive.google.com/file/d/1KP4kGJo6qQNyhgNhVlrzv3ZdJtnx0Okc/view?usp=sharing

ArimaKousei_0-1658381438916.png

ArimaKousei_2-1658381523822.png

ArimaKousei_3-1658381565727.png

ArimaKousei_4-1658381591994.png

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors