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
Dunner2020
Post Prodigy
Post Prodigy

Mapping table column value to measure using pie chart

Hi there,

 

I got data that contains app_id, stage of the application process. An app_id can have multiple stages. To pick the latest stage, there is a column called attribute order which contains a number from 1 to 5.  I want to show the latest stages of the application that are 'in progress'. I created a following measure to calculate the no of in progress applications as follow:

 

In Progress Applications =
Var _table = SUMMARIZE(FILTER('Main Table','Main Table'[Application_Status__c] = "In Progress"),'Main Table'[App_ID],"Attribute order",Max('Main Table'[Attribute Order]))
RETURN
COUNTROWS(_table)
 
When I used the above measure in pie chart visual it shows the correct number of in-progress applications i.e. 900 (as shown in the picture).
Dunner2020_0-1642624127475.png

 

However, when I tried to use the same measure in the pie chart visual and tried to show the split w.r.t to their latest stages, the total number of in progress application went to 29xx which is not correct. as shown in the picture:
 
Dunner2020_1-1642624190054.png

 


 

I am not sure how to present the map the attribute values to the above mentioned measure. Any help would be really appreciated.

 

Sample file here

 
 
2 REPLIES 2
amitchandak
Super User
Super User

@Dunner2020 , try a measure like

Measure =
VAR __id = MAX ('Table'[App_ID] )
VAR __date = CALCULATE ( MAX('Table'[Attribute Order] ), ALLSELECTED ('Table' ), 'Table'[App_ID] = __id,'Table'[Application_Status__c] = "In Progress" )
CALCULATE ( Countrows ('Table' ), VALUES ('Table'[App_ID] ),'Table'[App_ID] = __id,'Table'[Attribute Order] = __date,'Table'[Application_Status__c] = "In Progress" )

@amitchandak , it retrun 1 which is not correct.

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.