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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
RoshanK
Helper II
Helper II

Calculate Volume Share ( when filter is coming from a table)

Hi,

I have 3 tables - Calendar, Dimension & Fact table. I have 2 measures:- Volume = SUM(Sales[Volume]) & 

Volume Share =
DIVIDE(
    [Volume],
    CALCULATE(
        [Volume],
        ALLSELECTED(Dim),
        ALLSELECTED(Sales)
    ))

 

I am using Volume Share measure in a table & line chart in a same page. I want to modify this measure such that when a user selects Product A, I want the line chart to show same value as when nothing is selected. Please refer to image.

 

RoshanK_0-1689344135989.png

Any guidance will be appreciated!

Thanks in advance!

4 REPLIES 4
RoshanK
Helper II
Helper II

Hi again,

 

This logic that I derived from your measure works 😃

I think there is another simple way to do it but unless I can figure it out. This is fine. Refer to picture:

RoshanK_0-1689412858302.png

 

This works in test file but not in real. I must be missing something!

BeaBF
Super User
Super User

@RoshanK Hi!
Try with something like:
Volume Share Modified =
IF (
ISFILTERED ( Dim[Product] ),
DIVIDE ( [Volume], [Volume], 1 ),
DIVIDE (
[Volume],
CALCULATE ( [Volume], ALLSELECTED ( Dim ), ALLSELECTED ( Sales ) )
)
)

BBF

Hi @BeaBF

 

This doesn't work. Based on your measure, the line chart shows the same 100% value for all or no selection.

RoshanK_0-1689409776289.png

 

Thanks!

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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