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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
LuisRode
New Member

visual comparison of two matrices

Hello community, I am doing a comparison of expenses of a workshop with equal matrices, for each matrix there is a 
filter to be able to determine the periods to compare I would like to know how I can visually make if a field increases against the other period an up arrow appears and if
it decreases it puts an arrow down Something like a stock market type

LuisRode_0-1692312338836.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @LuisRode ,

 

Here are the steps you can follow:

 

1. Create measure.

Flag1value =
var _min=MINX(ALLSELECTED(Date1),'Date1'[Date])
var _max=MAXX(ALLSELECTED(Date1),'Date1'[Date])
var _groupsum=
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Group]=MAX('Table'[Group])&&'Table'[Date]>=_min&&'Table'[Date]<=_max),[Value])
var _allsum=
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Date]>=_min&&'Table'[Date]<=_max),[Value])
return
DIVIDE(_groupsum,_allsum)
Flag2value =
var _min=MINX(ALLSELECTED(Date2),'Date2'[Date])
var _max=MAXX(ALLSELECTED(Date2),'Date2'[Date])
var _groupsum=
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Group]=MAX('Table'[Group])&&'Table'[Date]>=_min&&'Table'[Date]<=_max),[Value])
var _allsum=
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Date]>=_min&&'Table'[Date]<=_max),[Value])
return
DIVIDE(_groupsum,_allsum)
Value1 =
var _min=MINX(ALLSELECTED(Date1),'Date1'[Date])
var _max=MAXX(ALLSELECTED(Date1),'Date1'[Date])
return
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Date]>=_min&&'Table'[Date]<=_max&&'Table'[Group]=MAX('Table'[Group])),[Value])
Value2 =
var _min=MINX(ALLSELECTED(Date2),'Date2'[Date])
var _max=MAXX(ALLSELECTED(Date2),'Date2'[Date])
return
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Date]>=_min&&'Table'[Date]<=_max&&'Table'[Group]=MAX('Table'[Group])),[Value])
Measure =
SWITCH(
    TRUE(),
    [Flag1value]>[Flag2value],UNICHAR ( 11014 ),
    [Flag1value]<[Flag2value],UNICHAR ( 11015 ),
    "="
    )

2. Result:

vyangliumsft_0-1692688725375.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

3 REPLIES 3
Anonymous
Not applicable

Hi  @LuisRode ,

 

Here are the steps you can follow:

 

1. Create measure.

Flag1value =
var _min=MINX(ALLSELECTED(Date1),'Date1'[Date])
var _max=MAXX(ALLSELECTED(Date1),'Date1'[Date])
var _groupsum=
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Group]=MAX('Table'[Group])&&'Table'[Date]>=_min&&'Table'[Date]<=_max),[Value])
var _allsum=
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Date]>=_min&&'Table'[Date]<=_max),[Value])
return
DIVIDE(_groupsum,_allsum)
Flag2value =
var _min=MINX(ALLSELECTED(Date2),'Date2'[Date])
var _max=MAXX(ALLSELECTED(Date2),'Date2'[Date])
var _groupsum=
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Group]=MAX('Table'[Group])&&'Table'[Date]>=_min&&'Table'[Date]<=_max),[Value])
var _allsum=
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Date]>=_min&&'Table'[Date]<=_max),[Value])
return
DIVIDE(_groupsum,_allsum)
Value1 =
var _min=MINX(ALLSELECTED(Date1),'Date1'[Date])
var _max=MAXX(ALLSELECTED(Date1),'Date1'[Date])
return
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Date]>=_min&&'Table'[Date]<=_max&&'Table'[Group]=MAX('Table'[Group])),[Value])
Value2 =
var _min=MINX(ALLSELECTED(Date2),'Date2'[Date])
var _max=MAXX(ALLSELECTED(Date2),'Date2'[Date])
return
SUMX(
    FILTER(ALLSELECTED('Table'),
    'Table'[Date]>=_min&&'Table'[Date]<=_max&&'Table'[Group]=MAX('Table'[Group])),[Value])
Measure =
SWITCH(
    TRUE(),
    [Flag1value]>[Flag2value],UNICHAR ( 11014 ),
    [Flag1value]<[Flag2value],UNICHAR ( 11015 ),
    "="
    )

2. Result:

vyangliumsft_0-1692688725375.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

LuisRode
New Member

Thanks for your answer, I already made each date filter independent for each display table

But I still can't achieve what I want, I'm looking for the image that I share to be able to compare between the two months and see which one has gone up and which one has gone down

 

LuisRode_0-1692372963517.png

 

amitchandak
Super User
Super User

@LuisRode, You need Independent/ disconnected tables for have second slicer, refer this, create two measures and have a diff

 

How to use two Date/Period slicers: https://youtu.be/WSeZr_-MiTg

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors