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.
Hello, I need some assistance here. I have below sample data. I need to find out the ratio between two status of the issue.
Needed output is ration between the types of issue (but only between Parts and Hardware). In this case it is 1:2
Somebody can please assist me? So that I can get ration for each site.
Sl No | Location | Type Of Issue | Date Reported | Status |
1 | Site 1 | Hardware | 10-Jan-24 | Resolved |
2 | Site 2 | Software | 10-Jan-24 | In Progress |
3 | Site 3 | Software | 10-Jan-24 | Resolved |
4 | Site 2 | Parts | 15-Jan-24 | Awaiting |
5 | Site 2 | Hardware | 15-Jan-24 | Resolved |
6 | Site 3 | Parts | 31-Jan-24 | Resolved |
7 | Site 7 | Hardware | 2-Feb-24 | Resolved |
8 | Site 8 | Hardware | 2-Feb-24 | Awaiting |
9 | Site 7 | Software | 20-Feb-24 | In Progress |
10 | Site 10 | Software | 20-Feb-24 | Resolved |
Solved! Go to Solution.
Hi @EbyEaso ,
Based on your problems, here are my answers.
First I created a table based on your description.
Then created four Measure.
Total Hardware Issues = SUMX(FILTER('Table', 'Table'[Type Of Issue] = "Hardware"), 1)
Total Parts Issues = SUMX(FILTER('Table', 'Table'[Type Of Issue] = "Parts"), 1)
Issue Ratio = DIVIDE([Total Hardware Issues], [Total Parts Issues])
Ratio Display = (CONCATENATE("1:", [Issue Ratio]))
Finally you will see the result you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank You @ThxAlot and @Jihwan_Kim
Bu am looking in a ration form. Example as below.
Thank You @ThxAlot @Jihwan_Kim
But am looking in a ration form.
Example as below.
Site | Hardware | Parts | Ratio |
Site 1 | 1 | 1:0 | |
Site 2 | 2 | 1 | 1:1 |
Site 3 | 5 | 15 | 1:3 |
Hi @EbyEaso ,
Based on your problems, here are my answers.
First I created a table based on your description.
Then created four Measure.
Total Hardware Issues = SUMX(FILTER('Table', 'Table'[Type Of Issue] = "Hardware"), 1)
Total Parts Issues = SUMX(FILTER('Table', 'Table'[Type Of Issue] = "Parts"), 1)
Issue Ratio = DIVIDE([Total Hardware Issues], [Total Parts Issues])
Ratio Display = (CONCATENATE("1:", [Issue Ratio]))
Finally you will see the result you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-yilong-msft Thank you for the response and udpate. Apreciate it. It works. Cool.
I havew one more thing. What if we have more decimal values in the outout. I tried to chnage the decimal value to zero, but it wont change in the result.
Hi,
I am not sure about how your semantic mode looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
KEEPFILTERS function (DAX) - DAX | Microsoft Learn
Issue count % only hardware + parts: =
VAR _countall =
COUNTROWS (
CALCULATETABLE (
Data,
'Type Of Issue'[Type Of Issue] IN { "Hardware", "Parts" }
)
)
VAR _count =
COUNTROWS (
CALCULATETABLE (
Data,
KEEPFILTERS ( 'Type Of Issue'[Type Of Issue] IN { "Hardware", "Parts" } )
)
)
RETURN
DIVIDE ( _count, _countall )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
46 | |
28 | |
23 | |
12 | |
8 |
User | Count |
---|---|
76 | |
51 | |
45 | |
16 | |
12 |