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

Different background color for subtotal

Hi, is it possible to have different color of background for the subtotal for fiscal year and quarter?

PBI_newuser_0-1634105207111.png

 

1 ACCEPTED SOLUTION
KNP
Super User
Super User

Hi @PBI_newuser,

 

Not all the way to the labels but as @amitchandak has pointed out, you can do it on the values.

If you don't want it to be dependent on any measure values as per @amitchandak solution, you can do it like this...

Create a measure, (change the table and field reference to match your data).

 

Colour =
SWITCH (
    TRUE (),
    ISINSCOPE ( financials[Date].[QuarterNo] ), "Red",
    ISINSCOPE ( financials[Date].[MonthNo] ), "Green",
    ""
)

 

 

See gif below and PBIX attached.

yPt7QYTNx1.gif

Hope this helps.

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @PBI_newuser,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
KNP
Super User
Super User

Hi @PBI_newuser,

 

Not all the way to the labels but as @amitchandak has pointed out, you can do it on the values.

If you don't want it to be dependent on any measure values as per @amitchandak solution, you can do it like this...

Create a measure, (change the table and field reference to match your data).

 

Colour =
SWITCH (
    TRUE (),
    ISINSCOPE ( financials[Date].[QuarterNo] ), "Red",
    ISINSCOPE ( financials[Date].[MonthNo] ), "Green",
    ""
)

 

 

See gif below and PBIX attached.

yPt7QYTNx1.gif

Hope this helps.

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
amitchandak
Super User
Super User

@PBI_newuser , Create a color measure and use isinscope  to color

 

Switch ( True() ,

not(isinscope(Date[Month])) && [Measure] <= 10000, "Red",

not(isinscope(Date[Month])) && [Measure] >= 10000, "green",

(isinscope(Date[Month])) && [Measure] >= 1000, "green",

//// Add other

"Red"

)

 

And us that is conditional formatting using field value option, and it should be for both value and total

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

 

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

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.