Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have 2 tables :
Name
| Name | Model | Type |
| Name 1 | Mono | LR |
| Name 2 | Mono | FA |
| Name 3 | Mono | LR |
| Name 4 | Mono | FA |
| Name 5 | Mono | LR |
| Name 6 | Mono | FA |
| Name 7 | Mono | LR |
| Name 8 | Mono | WI |
| Name 9 | Bisite | WI |
| Name 10 | Bisite | WI |
| Name 11 | Bisite | WI |
| Name 12 | Bisite | WI |
| Name 13 | Bisite | LR |
| Name 14 | Bisite | FA |
| Name 15 | Bisite | LR |
| Name 16 | Bisite | FA |
Number
| Name | USED | FREE |
| Name 1 | 80 | 86 |
| Name 10 | 90 | 95 |
| Name 11 | 50 | 95 |
| Name 12 | 50 | 95 |
| Name 13 | 40 | 40 |
| Name 14 | 40 | 40 |
| Name 15 | 40 | 40 |
| Name 16 | 40 | 40 |
| Name 2 | 90 | 85 |
| Name 3 | 55 | 55 |
| Name 4 | 85 | 100 |
| Name 5 | 50 | 95 |
| Name 6 | 50 | 95 |
| Name 7 | 50 | 95 |
| Name 8 | 50 | 95 |
| Name 9 | 90 | 95 |
The 2 tables have 1 - 1 relation
I have a measure to count name
Measure = var _total = CALCULATE(DISTINCTCOUNT(Name[Name]), Name[Model] = "Mono" && (Name[Type] = "WI" || Name[Type] = "LR"))
var _cf = CALCULATE(DISTINCTCOUNT((Name[Name]), Name[Model] = "Mono" && (Name[Type] = "WI" || Name[Type] = "LR" ), FILTER(Number, Number[USED]<= 85 ) , FILTER(Number[FREE] <=85), USERELATIONSHIP( Number[Name], (Name[Name] )))
RETURN _cf &" / "&_total
| Name | USED | FREE |
| Name 1 | 80 | 86 |
| Name 3 | 55 | 55 |
| Name 5 | 50 | 95 |
| Name 7 | 50 | 95 |
| Name 8 | 50 | 95 |
Solved! Go to Solution.
@Anonymous ,
Understood, use the below measure to do that.
Proud to be a Super User!
@Anonymous
color measure given by dane does work. What are you exactly looking for?
Proud to be a Super User!
Hi,
I created the measure color of @danextian but it doesn't work.
I would like to create a measure to color the card :
| Name | USED | FREE |
| Name 1 | 80 | 86 |
| Name 3 | 55 | 55 |
| Name 5 | 50 | 95 |
| Name 7 | 50 | 95 |
| Name 8 | 50 | 95 |
@Anonymous ,
I can see it is working, could you please share what is your exact requirement?
Proud to be a Super User!
Hi,
I would like to color the card with the color
And the rule of color is:
@Anonymous ,
Understood, use the below measure to do that.
Proud to be a Super User!
Thank you for your help .
Hi @Anonymous
Try this:
color =
VAR _used =
CALCULATE (
SELECTEDVALUE ( Number[USED] ),
USERELATIONSHIP ( 'Name'[Name], 'Name'[Name] )
)
VAR _free =
CALCULATE (
SELECTEDVALUE ( Number[FREE] ),
USERELATIONSHIP ( 'Name'[Name], 'Name'[Name] )
)
VAR _max =
MAX ( _used, _free )
RETURN
SWITCH ( TRUE (), _max > 95, "red", _max > 90, "orange", _max > 85, "yellow" )
Hi, sorry I didn't give enough info in the first post, I have added some more info. thank you for your help
@Anonymous
try something simialr to this (create measure for USED/FREE or use MAX etc, depends how yo will display in visual):
SWITCH(TRUE(),
[USED] || [FREE] > 85, "yellow",
[USED] || [FREE] > 90, "orange",
[USED] || [FREE] > 95, "red"
)
Hi, I have justed added some more info, hope you could help. Thank you.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!