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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Impactful Individual
Impactful Individual

@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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors