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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
jacquelineq
Helper I
Helper I

Tooltip - display count for respective part in stacked column chart

Hi all, I need help with displaying the count for the respective part in my stacked column chart. 

 

Currently, my formula for 'No. of responses' is COUNT((Table) [column]) but it counts all the entries in the particular table.  How do I change my formula such that it only counts for the particular part?

 

Image 1.png

Thanks!

1 ACCEPTED SOLUTION

Hi @jacquelineq ,

I updated your sample pbix file(see the attachment), please check the details in Page 2...

Count = COUNT('Sheet1'[Choice])
% Choice = 
VAR _all =
    CALCULATE (
        COUNT ( 'Sheet1'[Choice] ),
        FILTER (
            ALLSELECTED ( 'Sheet1' ),
            'Sheet1'[FY] = SELECTEDVALUE ( 'Sheet1'[FY] )
        )
    )
VAR _per = [Count]
RETURN
    DIVIDE ( _per, _all )

yingyinr_2-1663834356792.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @jacquelineq ,

How did you set your stacked column chart? Are the field involved in the stacked column chart from the same table? Do you want to get the respective count of response base on different category(the legend field)? Could you please provide some raw data(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @v-yiruan-msft , thanks so much for your reply! 

 

I did a simple pbix file here -https://drive.google.com/file/d/1eoeC3gjRo2ocxxjphxBwh2YvZIhyoL4z/view?usp=sharing . Essentially, I want to show the count in the tooltip. How do I do that?

 

Image 1.png

Hi @jacquelineq ,

I updated your sample pbix file(see the attachment), please check the details in Page 2...

Count = COUNT('Sheet1'[Choice])
% Choice = 
VAR _all =
    CALCULATE (
        COUNT ( 'Sheet1'[Choice] ),
        FILTER (
            ALLSELECTED ( 'Sheet1' ),
            'Sheet1'[FY] = SELECTEDVALUE ( 'Sheet1'[FY] )
        )
    )
VAR _per = [Count]
RETURN
    DIVIDE ( _per, _all )

yingyinr_2-1663834356792.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yiruan-msft , thank you so much for your help! I have applied your formula on my actual chart and it works! Just have 1 last question which I'm not sure if you can help me with. For the tooltip, I'm not sure why the the % is shown twice (in arrows below).

 

Image 2.png

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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