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

formula help on calculate on data row

table
1-measures
2-colors
3-months

 

the request is a bar for every measure + color as a percentage of (measure color / measure all colors)

so i made a new measure of "measure + color" and that works for a count and seperate bars over time.

NOTE: each monthly group of bars can have several different measures + colors

 

i need to do a calculation so that it can extract that measure and get a count of all colors of that measure for the denominator. the numerator is already the count i have working.

 

just trying to get the denominator i want all colors for that measure but this calculation just gives me counts for measure + color

Measure new = CALCULATE(count('table'[measure]),all('table'[color]))
output
measure1Green = 26
measure1Blue = 4
measure2Green = 5
measure3Blue = 1
desired output for the denominator
measure1Green = 30 (26 + 4)
measure1Blue = 30 (26 + 4)
measure2Green = 6 (5 + 1)
measure3Blue = 6 (5 + 1)
 
if i can get the denominator calculated then i can finish my percentage of num / den
i saw in Tooltip it does a FIRST and maybe i could use FIRST in my calculate with FIRSTnonBlank(measure,true())

 

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

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

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.