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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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