Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have an order table from where I would like to shor percentage of claim vs. all orders.
I have a claim colum and a colum for a complete sale (date).
Claim colum contains:
Null on the majority of orders
1 - Claim type 1
2 - Claim type 2
0 (error from db, so 0 i actually a normal order and should have null value.
When I do a diagram I want in each bar (per store) to show all orders (all blanks (null)) and status 0, as those are normal orders. Then I want to show how big a part status 1 and 2 are of the total orders. But as all sales are null, those with 0 is seen as a claim. If I filter 0 away then I see the actual claim, but I miss the rows with 0 on total amount of orders.
In Query Editor I cannot change 0 to Null
Any suggestions?
When using calculate be sure to filter to 0 as well as "" for the null values. Put your measures in seperately. Depending on how you want to create your measures You could start with a simple Count like:
Total Claim Type 2 = CALCULATE(COUNT(Fact[Claim]), Fact[Claim]=1) Which would give you a count of claims where the claim type is 1. You would need a count of all claims: Total All Claims = COUNT(Fact[Claim]).
Then use Divide with those two measures: % Type 1 = DIVIDE([Total Claim Type 2], [Total All Claims]).
Of course, from your post, it is difficult to imagine the actual data formats. You may want to use SUM. I was making an assumption that claim referred to a claim type reference. If you have different fields, the calculations would be different. For example, if you have sales totals in a sales total column it might be something more along the lines of =CALCULATE(SUM(Fact[Sales]), Fact[Claim]=1) to calculate the total sales amount of sales lines with claim type of 1.
Can you post a bit of data to work with?
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
38 | |
29 | |
28 |
User | Count |
---|---|
99 | |
88 | |
62 | |
42 | |
39 |