Showing results for 
Search instead for 
Did you mean: 
Seanlzx Frequent Visitor
Frequent Visitor

Working with Sample Level RAW Data on PBI

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:


SmokesNuSticRanMarDistRanAgeBand Labels             
00111 Smokes  Nustic  RanMar  DistRan  AgeBand 
11111 0No 0Non Smoker 0No 1Less than 10km 1Below 18
12122 1Yes 11-5 sticks 1Yes 210-15km 218-25
14003    26-10 sticks    3Above 15km 326-35
00122    311-15 sticks       436-45
11004    416 sticks and above       5Above 45


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!

Community Support Team
Community Support Team

Re: Working with Sample Level RAW Data on PBI



You may add the measure below.

Measure =
DIVIDE ( COUNTROWS ( Table1 ), COUNTROWS ( ALL ( Table1 ) ) ) + 0
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.