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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
THENNA_41
Post Partisan
Post Partisan

Comparing Two Month Column Values, then Arrow Conditional Formatting Based On Comparison

I have three months value in the table  Feb,March,April based on the Attribute Wise . 

please find the screen shot below. i am trying to use conditional formatting for the below table.

 

THENNA_41_0-1654689634016.png

 

 

  • When MARCH MONTH  values are less than FEB MONTH , it will show in conditional formatting Down Arrow.
  • When MARCH MONTH  values are Greater than FEB MONTH , it will show in conditional formatting UP Arrow.
  • When APRIL MONTH  values are less than MARCH MONTH , it will show in conditional formatting Down Arrow
  • When APRIL MONTH  values are Greater than MARCH MONTH , it will show in conditional formatting UP Arrow

Can anyone please advise me on this?  I am looking for support .

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @THENNA_41 ,

Here are the steps you can follow:

1. Use Enter data to create a table Month.

vyangliumsft_0-1655103720293.png

2. In Power query. Add Column – Index Column – From 1.

vyangliumsft_1-1655103720295.png

3. Create calculated column.

Month =
FORMAT('Table'[Date],"mmm")
Month_number =
MONTH('Table'[Date])

4. Join the two tables.

vyangliumsft_2-1655103720295.png

5. Create measure.

Measure_true =
var _current1=
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month_number]=MAX('Table'[Month_number])-1&&'Table'[Group]=MAX('Table'[Group])))
var _current2=
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month_number]=MAX('Table'[Month_number])&&'Table'[Group]=MAX('Table'[Group])))
return
SWITCH(
    TRUE(),
    _current2>_current1,UNICHAR ( 9650 ),
    _current2<_current1,UNICHAR ( 128315 ),
    _current2=_current1,"=")

6. Result:

vyangliumsft_3-1655103720296.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @THENNA_41 ,

Here are the steps you can follow:

1. Use Enter data to create a table Month.

vyangliumsft_0-1655103720293.png

2. In Power query. Add Column – Index Column – From 1.

vyangliumsft_1-1655103720295.png

3. Create calculated column.

Month =
FORMAT('Table'[Date],"mmm")
Month_number =
MONTH('Table'[Date])

4. Join the two tables.

vyangliumsft_2-1655103720295.png

5. Create measure.

Measure_true =
var _current1=
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month_number]=MAX('Table'[Month_number])-1&&'Table'[Group]=MAX('Table'[Group])))
var _current2=
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month_number]=MAX('Table'[Month_number])&&'Table'[Group]=MAX('Table'[Group])))
return
SWITCH(
    TRUE(),
    _current2>_current1,UNICHAR ( 9650 ),
    _current2<_current1,UNICHAR ( 128315 ),
    _current2=_current1,"=")

6. Result:

vyangliumsft_3-1655103720296.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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