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.
Hi All,
First of all, apologies if this is a very noobish question. However, I've just started working with PBI and it has been great so far, as long as the data is formatted nicely.
Currently, I'm exploring into the next stage of capabilities of PBI, which is working with Raw data (1s and 0s).
An example of a dataset I have is:
Smokes | NuStic | RanMar | DistRan | AgeBand | Labels | ||||||||||||||
0 | 0 | 1 | 1 | 1 | Smokes | Nustic | RanMar | DistRan | AgeBand | ||||||||||
1 | 1 | 1 | 1 | 1 | 0 | No | 0 | Non Smoker | 0 | No | 1 | Less than 10km | 1 | Below 18 | |||||
1 | 2 | 1 | 2 | 2 | 1 | Yes | 1 | 1-5 sticks | 1 | Yes | 2 | 10-15km | 2 | 18-25 | |||||
1 | 4 | 0 | 0 | 3 | 2 | 6-10 sticks | 3 | Above 15km | 3 | 26-35 | |||||||||
0 | 0 | 1 | 2 | 2 | 3 | 11-15 sticks | 4 | 36-45 | |||||||||||
1 | 1 | 0 | 0 | 4 | 4 | 16 sticks and above | 5 | Above 45 | |||||||||||
0 | 0 | 1 | 3 | 5 |
What I'm aiming to achieve is to create a report with visualizations that show the percentages of 1s, or 2s, or 3s, in the metric.
For example, For DistRan, in the report it should be showing me 28.5% (2 out of total 7 people) ran less than 10km. However, if I apply a filter of Number of sticks smoked (NuStic) of 1-5 sticks, the data should show 14.3% (1 out of total 7 people), as only 1 sample smokes 1-5 sticks and ran less than 10km.
Similarly, if I were to apply two filters, for example, smokes 1-5 sticks, and is 36-45 years old, then the result should become 0% (No sample qualifies in that sense).
Now after playing with the data for a while, I've figured how to use relationships to enable the codes (the 0s, 1s, 2s) to filter the data. However, I still can figure out how to create the visualizations from such datasets. Would love to hear if anyone works with sample level data on powerbi.
Thanks in advance!
You may add the measure below.
Measure = DIVIDE ( COUNTROWS ( Table1 ), COUNTROWS ( ALL ( Table1 ) ) ) + 0
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |