Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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 ;).
xOIEmaj

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.
image
fabric-SUbadge
Proud to be a Super User!

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

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

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 ;).
xOIEmaj

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.
image
fabric-SUbadge
Proud to be a Super User!
Euser
Frequent Visitor

Hi @KNP,

Can we add background color for first coloum also where 2023, monthname is displayed.

 

Thanks!

 

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

Could you please let me know is it possible add background color where  2023,monthname is displayed 

 

Thanks

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors