Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Cluster Column Chart Not calculating percent of string variable by x-axis correctly

Hello, 

 

I searched this forum, but I could not find anything that solved my issue. I have a matrix table with the count of two different categories by year. If I add my value and show as "pecent of column", it gives me the correct percentage. When I add this to a clustered column chart, it does not give me the correct percentage. Please help! 

 

Measure = DIVIDE(

COUNT(DISP_HISTORY[CD Count]),
CALCULATE(COUNT(DISP_HISTORY[CD Count]), ALLEXCEPT(DISP_HISTORY, DISP_HISTORY[Start of Week])))
 
A 2019 Should be 0%
B 2019 should be 100%
 
A 2020 should be 3%
B 2020 should be 97%
 
fdfdsfdsf.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I figured it out. 

 

The measure I needed was: 

 

Measure = DIVIDE(

COUNT(DISP_HISTORY[CD Count]),
CALCULATE(COUNT(DISP_HISTORY[CD Count]), AllSelected (DISP_HISTORY[CD Count)))

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I figured it out. 

 

The measure I needed was: 

 

Measure = DIVIDE(

COUNT(DISP_HISTORY[CD Count]),
CALCULATE(COUNT(DISP_HISTORY[CD Count]), AllSelected (DISP_HISTORY[CD Count)))
Fowmy
Super User
Super User

@Anonymous 

Try one of the following meassures:

 

Measure = 
DIVIDE(
    COUNT(DISP_HISTORY[CD Count]),
    CALCULATE(
        COUNT(DISP_HISTORY[CD Count]), 
        ALLSELECTED(DISP_HISTORY[Start of Week])
    )
)
Measure = 
DIVIDE(
    COUNT(DISP_HISTORY[CD Count]),
    CALCULATE(
        COUNT(DISP_HISTORY[CD Count]), 
        ALLSELECTED(DISP_HISTORY[Year])
    )
)

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Thank you. The first measure gives me 100% for all columns. 

 

The second measure gives me the percentage by legand (CD Count) rather than Axis (year) 

 

3.jpg

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.