Forum Discussion
POWER BI
Hi,
Here is what I am thinking to do, and getting stuck in Power BI.
Let's say, I have a table with 4 columns; "Year", "Gender" "Smoker Status" and "number of people"
Part 1. How many % of people are Male or Female each year? For example, in 2012, Male: 45% and Female: 55%...
Part 2. Starting from part 1, is there way to show like... WITHIN the 45% male in 2012, how many % are smokers?
What I want to do is basically displaying those information above as a form of visualizations with options of filtering.
I somewhat handled Part 1, BUT when I try to do the part 2, it shows % of smokers in OVERALL... not % within my filter, which is male..
That saying, if 45% are Males in 2012 and 50% of them are smokers, what I wanted to see is "50%" when I filter with male and smoker, but what i see is 22.5%, which is 50% of 45%.
Would you anyone help me out with this problem?
Hope my explanation makes sense.
Thanks,
Hey,
not sure if I understand you correctly for this reason I created a little gif that demonstrates how you can apply "additional" filter by pressing control and select from a second visual for example.
I created a measure to calculate the ratio of selections to all rows
ratio of population = COUNTROWS('Table1') / CALCULATE( COUNTROWS('Table1') ,ALL('Table1') )And here is the gif
Hopefully this is what you are looking for
Regards,
Tom
3 Replies
- TomMartensSuper User
Hey,
not sure if I understand you correctly for this reason I created a little gif that demonstrates how you can apply "additional" filter by pressing control and select from a second visual for example.
I created a measure to calculate the ratio of selections to all rows
ratio of population = COUNTROWS('Table1') / CALCULATE( COUNTROWS('Table1') ,ALL('Table1') )And here is the gif
Hopefully this is what you are looking for
Regards,
Tom
- kimx3263New Member
Definately Help SO MUCH!!
You rock!
Thanks!
- TomMartensSuper User
Hey kimx3263,
please consider to mark my answer as solution this will also help others.
And if you really appreciate my solution you also might consider to give a Kudos to the answer ;-)
Cheers,
Tom