Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Solved! Go to Solution.
Hi @Ca_David_Pan ,
The first time you use the calculated column, you are actually calculating ('Sales'[TaxRate1]/'Sales'[Product]) for each row of the sales table, and when you put it into the visualization, you actually get the sum of ('Sales'[TaxRate1]/'Sales'[Product]). What we actually want is the result of (SUM('Sales'[Taxrate1])/SUM('Sales'[Taxrate1])), which is different from the result of ('Sales'[TaxRate1]/'Sales'[Product]).
Have you tried Ashish_Mathur's method yet? He should be right, if his answer is helpful to you, please don't forget to mark his answer as a solution, it will help more people.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi,
Write these measures (not calculated column formulas)
Products = sum(Sales[Product])
Tax rate = sum(Sales[Tax rate1])
HST as a % of sales = divide([Tax rate],[Products])
Hope this helps.
product and tax rate are columns or measures? If columns try to divide the SUM of each
it is column, I tried but still got the wield numbers with the total 64.86. it should be 10.68% if the calculation is correct. 😂
Hi @Ca_David_Pan ,
The first time you use the calculated column, you are actually calculating ('Sales'[TaxRate1]/'Sales'[Product]) for each row of the sales table, and when you put it into the visualization, you actually get the sum of ('Sales'[TaxRate1]/'Sales'[Product]). What we actually want is the result of (SUM('Sales'[Taxrate1])/SUM('Sales'[Taxrate1])), which is different from the result of ('Sales'[TaxRate1]/'Sales'[Product]).
Have you tried Ashish_Mathur's method yet? He should be right, if his answer is helpful to you, please don't forget to mark his answer as a solution, it will help more people.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
89 | |
84 | |
76 | |
64 |
User | Count |
---|---|
136 | |
111 | |
98 | |
97 | |
92 |