Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
95 | |
86 | |
78 | |
72 | |
66 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |