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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |