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
I need help to convert the general number displayed in the funnel graph into percentage. When I tried to click on the measure values (Female - green colour) and convert it into percentage, the displayed value is not correct. For example, the actual number of female as shown in the order:
Female participants: 11, 9, 3, 1, 0, 1
When I tried to convert them into percentage, for the top row, green bar (female) shld show 11/ (20+11) = 35% and the purple bar (male) shld be 20/(20+11) = 65%
Likewise for the second row, the green bar (female) shld be 9/(12+9) = 43% and the 2nd purple row (male) shld be 57%. It goes on for the rest.
Solved! Go to Solution.
Hi @Anonymous ,
Just add [year] column into the filter formula:
Male =
DIVIDE (
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[Gender] = "Male"
&& 'Table'[FY Year] IN DISTINCT ( 'Table'[FY Year] )
)
),
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[FY Year] IN DISTINCT ( 'Table'[FY Year] )
)
)
)
Female =
DIVIDE (
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[Gender] = "Female"
&& 'Table'[FY Year] IN DISTINCT ( 'Table'[FY Year] )
)
),
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[FY Year] IN DISTINCT ( 'Table'[FY Year] )
)
)
)
Please check the sample file in the below.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can create measure like this:
Male =
DIVIDE (
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[Gender] = "Male"
)
),
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER ( ALL ( 'Table' ), 'Table'[Business] IN DISTINCT ( 'Table'[Business] ) )
)
)
Female =
DIVIDE (
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[Gender] = "Female"
)
),
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER ( ALL ( 'Table' ), 'Table'[Business] IN DISTINCT ( 'Table'[Business] ) )
)
)
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yingjl
THanks. It works.
I got it right but when I tried to use FY slicer to filter by years, the funnel graph did not update accordingly. Previously, the funnel graph that only highlights the absolute number could be updated accordingly whenever I select different years.
Is there any way for me to do something to the DAX formula so that whenever I select different year, the funnel graph should be updated accordingly.
Hi @Anonymous ,
Just add [year] column into the filter formula:
Male =
DIVIDE (
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[Gender] = "Male"
&& 'Table'[FY Year] IN DISTINCT ( 'Table'[FY Year] )
)
),
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[FY Year] IN DISTINCT ( 'Table'[FY Year] )
)
)
)
Female =
DIVIDE (
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[Gender] = "Female"
&& 'Table'[FY Year] IN DISTINCT ( 'Table'[FY Year] )
)
),
CALCULATE (
COUNT ( 'Table'[Gender] ),
FILTER (
ALL ( 'Table' ),
'Table'[Business]
IN DISTINCT ( 'Table'[Business] )
&& 'Table'[FY Year] IN DISTINCT ( 'Table'[FY Year] )
)
)
)
Please check the sample file in the below.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
Just follow these steps and let me know if this is good!
Proud to be a Super User!
Hi @VijayP
I cannot see your animate gif as the size is so small and I could not see the word or data in the gif. May I request for larger size, pls?
Hi @Anonymous
Please download this PBIX file with a solution
Create these 2 measures
% Female = DIVIDE( SELECTEDVALUE('Table'[Female]) , SELECTEDVALUE('Table'[Male]) + SELECTEDVALUE('Table'[Female]))
% Male = DIVIDE( SELECTEDVALUE('Table'[Male]) , SELECTEDVALUE('Table'[Male]) + SELECTEDVALUE('Table'[Female]))
Regards
Phil
Proud to be a Super User!
Thank you very much. But the thing about your raw data is not the same as mine. I understand where you ar coming from. In your raw data, you have already aggregated the total number of male and female participants for each particular business. In my case, I have individual business that will indicate that the participant is either male or female
I agree with your approach but before I obtain your suggested table, how do I need to sum up all male and female participants from particular business into total male and female for that particular business? I am open to your suggestion.
My mock table with selected columns
@Anonymous
I hvcreted additional columns in Power Query, you can usee the Female 1 and Male 1 columsn in that chart
if you can share the pbix wihtout sensitive data i can help you!
Proud to be a Super User!
@Anonymous , I think in this case you have to create a % column and use that
Male % , divide([male], [male]+[female])
female % , divide([male], [male]+[female])
Hi thanks @VijayP @amitchandak
But the problem is that how do I need to create % column
Here is the mock data here:
How do I need to create? Do I need to unpivot the gender into Male and Female columns?
Hi,
Create these 2 measures
Male = calculate(distinctcount(data[email]),data[gender] = "male")
Female = calculate(distinctcount(data[email]),data[gender] = "female")
Now use the measures shared by Amit.
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 |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |