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
rithu
Frequent Visitor

Stacked Col Chart : Legends not working as expected with field parameters

Hello, 

 

I have a Stacked Column chart, Where x is type of subject and y is a field parameter with measures - attendence percentage and absent percentage. In the legends, I want to reasons why they were absent (sick, permission grated, no permission, attended, leave). 

 

When I add the legends with the measures. All the legends are set 100% and the actual % for various reasons don't show up. Where could it have gone wrong?

 

Can you help?

 

Table 

Subjects - English, Maths, Science, Social

attendence percentage measure - DIVIDE(countrows(ATTENDED),countrows(allvalues))

Reasons - sick, permission grated, no permission, attended, leave

 

 

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@rithu , You have create a measure like

 

 DIVIDE(countrows(filter( Table, Table[reasons]= "ATTENDED") ) ,calculate(countrows(Table, removefilters(Table[reasons] ) ) ) )

 

or

 

DIVIDE(countrows(Table) ,calculate(countrows(Table, removefilters(Table[reasons] ) ) ) )

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@rithu , You have create a measure like

 

 DIVIDE(countrows(filter( Table, Table[reasons]= "ATTENDED") ) ,calculate(countrows(Table, removefilters(Table[reasons] ) ) ) )

 

or

 

DIVIDE(countrows(Table) ,calculate(countrows(Table, removefilters(Table[reasons] ) ) ) )

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.