Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Solved! Go to Solution.
Hey,
I understand now.
You should consider to create a star schema, a one table solution has always its shortcomings
First I created a table Dimension Product using this DAX statement:
dimension product = DISTINCT('Sheet1'[Products])
Then I created a relationship between your data table (the fact table) and the new dimension product table:
I created a measure (it is more convenient) to reference the measure then to always write the complete formula:
Total Value = SUM('Sheet1'[Value])
Then I write the final measure:
Value showing zeros = var theValue = [Total Value] return IF(ISBLANK(theValue) , 0 , theValue)
This allows to create the following table:
Please be aware that the Products are coming from the Table "Dimension Product" and not from the data table. This is a best practice as well as data modeling using a star schema.
Regards,
Tom
Hey,
please prepare a pbix file that contains sample data and reflects your data model, upload the pbix to onedrive or sharepoint and share the link.
Regards,
Tom
Hey,
I understand now.
You should consider to create a star schema, a one table solution has always its shortcomings
First I created a table Dimension Product using this DAX statement:
dimension product = DISTINCT('Sheet1'[Products])
Then I created a relationship between your data table (the fact table) and the new dimension product table:
I created a measure (it is more convenient) to reference the measure then to always write the complete formula:
Total Value = SUM('Sheet1'[Value])
Then I write the final measure:
Value showing zeros = var theValue = [Total Value] return IF(ISBLANK(theValue) , 0 , theValue)
This allows to create the following table:
Please be aware that the Products are coming from the Table "Dimension Product" and not from the data table. This is a best practice as well as data modeling using a star schema.
Regards,
Tom
Hey,
the link you provided requires a login, I'm not going to login to download your sample data. Maybe you can provide another link or update the settings of that link.
Regards,
Tom