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
learner03
Post Partisan
Post Partisan

Pie Chart with COUNT

I need a basic pie chart where the total should be constant number, say, 2000. and there is a table that has item lines. I need to show the basic calculation on pie cart, as to from total 2000, how many items lines we have.

example-In the table there are 1700 lines, so how much  is remaining. (but in a pie chart)

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I suggest having a STATUS table like below.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1669608773129.pngJihwan_Kim_1-1669608786451.png

 

Jihwan_Kim_2-1669608999934.png

 

 

Expected result measure: =
VAR _countrow =
    COUNTROWS ( Data )
RETURN
    SWITCH (
        SELECTEDVALUE ( 'Status'[Status] ),
        "All count", _countrow,
        "Remaining count upto 500", 500 - _countrow
    )

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I suggest having a STATUS table like below.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1669608773129.pngJihwan_Kim_1-1669608786451.png

 

Jihwan_Kim_2-1669608999934.png

 

 

Expected result measure: =
VAR _countrow =
    COUNTROWS ( Data )
RETURN
    SWITCH (
        SELECTEDVALUE ( 'Status'[Status] ),
        "All count", _countrow,
        "Remaining count upto 500", 500 - _countrow
    )

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.