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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Memorable Member
Memorable Member

@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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.