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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Calculated Measure based on two different slicers

Hi,
I have two slicers that comes from different tables. Now need to create a measure based on these slicers.

For example,
If one slicer is of date table

The other slicer is from dept table

Need to calculate a measure based on these two slicers.


3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

 

I create a simple sample that contains two slicers from different tables and create a measure to do calculation dynamically.

Measure =
VAR selectedvalue =
    SELECTEDVALUE ( Slicer[Country] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            'Table',
            'Table'[Country] = selectedvalue
                && 'Table'[Date] >= MIN ( 'Date'[Date] )
                && 'Table'[Date] <= MAX ( 'Date'[Date] )
        )
    )

v-xuding-msft_0-1598322596331.png

 

Note: The slicers tables are unconnected. There is no relationship among the three tables. If there is one, the result will be affected by it.

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
FarhanAhmed
Community Champion
Community Champion

Can you please share sample data ?

 

You need to create relationship between your tables and then create measure 

Then you need to  create Slicer from Date & Other table







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




amitchandak
Super User
Super User

@Anonymous , if they joined with the table if the filter automatically . If they are disconnected

 

calculate([measure],filter(Table, Table[date] in allselected(Date[date]) && Table[dept ] in allselected(dept [dept])))

calculate([measure],filter(Table, Table[date] in values(Date[date]) && Table[dept ] in values(dept [dept])))

 

 

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.