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
cosminc
Post Partisan
Post Partisan

relative measure in graphs in cascade % from previous

Hi all

i have 2 graphs - monthly and weekdays split and i need to build same graphs but with evolutiuon than previous (%relatives)

for ex: feb 2017: 23.4/24.7*100-100

mar 2017:20.7/23.4*100-100

same for 2018 on right

and for weekday also in the other graph (Tuesday 16.7/16.3*100-100) and so on

Can youy help me please with that measures? let's say that the dimensions are Year, Months and Sales for firts graph and Weekday and sales for the second

Thanks!

Cosmin

 

monthly.jpgweekday.jpg

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @cosminc,

 

Based on below sample data, you could create measures like below:

1.PNG

Previous month sales =
CALCULATE (
    SUM ( 'Monthly Sales'[Sales] ),
    FILTER (
        ALL ( 'Monthly Sales' ),
        'Monthly Sales'[Year] = MAX ( 'Monthly Sales'[Year] )
            && 'Monthly Sales'[Month]
                = MAX ( 'Monthly Sales'[Month] ) - 1
    )
)

%relatives =
IF (
    [Previous month sales] <> BLANK (),
    MAX ( 'Monthly Sales'[Sales] ) / [Previous month sales]
        * 100
        - 100,
    BLANK ()
)

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @cosminc,

 

Based on below sample data, you could create measures like below:

1.PNG

Previous month sales =
CALCULATE (
    SUM ( 'Monthly Sales'[Sales] ),
    FILTER (
        ALL ( 'Monthly Sales' ),
        'Monthly Sales'[Year] = MAX ( 'Monthly Sales'[Year] )
            && 'Monthly Sales'[Month]
                = MAX ( 'Monthly Sales'[Month] ) - 1
    )
)

%relatives =
IF (
    [Previous month sales] <> BLANK (),
    MAX ( 'Monthly Sales'[Sales] ) / [Previous month sales]
        * 100
        - 100,
    BLANK ()
)

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi

Thanks a lot, very helpfull your support.

thanks again also for your effort, i was stuck on this!

Cosmin

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.