cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper IV

## How to combine 3 MEASURES fitering with 2 different FILTER

Hi

How to combine 3 measure appear in one card which is filtering by 2 type filter

In Red number there is 3 type measure : Today, Last 30 Day and MTD

This 3 measure need to filtering by 2 filter :

1. Button filter : Today and Last 30 Days

2. Drop box for each MTD

This 2 type filter will affected Red number

I used SWITCH but it doesn't work

``````A_Slicer =
SWITCH(
[A_Selected_Measure],
1,[A_Points_Today],
2,[A_Points_Last30D]
)``````

1 ACCEPTED SOLUTION
Community Support

Hi @Delion ,

Based on your description, I have created three measures and a combined measure:

``````Last 30 days =
CALCULATE (
SUM ( 'Table'[Value] ),
DATESINPERIOD ( 'Table'[Date], TODAY (), -30, DAY )
)

Today =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Date] = TODAY () )

MTD =
CALCULATE ( SUM ( 'Table'[Value] ), DATESMTD ( 'Table'[Past month] ) )``````
``````Combined measure =
IF (
ISFILTERED ( 'Slicer table'[Slicer] ),
SWITCH (
SELECTEDVALUE ( 'Slicer table'[Slicer] ),
"Last 30 days", [Last 30 days],
"Today", [Today]
),
IF ( ISFILTERED ( 'Table'[Past month] ), [MTD], "Please selected a slicer" )
)
``````

Attached a sample file in the below, hopes it could help.

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

2 REPLIES 2
Community Support

Hi @Delion ,

Based on your description, I have created three measures and a combined measure:

``````Last 30 days =
CALCULATE (
SUM ( 'Table'[Value] ),
DATESINPERIOD ( 'Table'[Date], TODAY (), -30, DAY )
)

Today =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Date] = TODAY () )

MTD =
CALCULATE ( SUM ( 'Table'[Value] ), DATESMTD ( 'Table'[Past month] ) )``````
``````Combined measure =
IF (
ISFILTERED ( 'Slicer table'[Slicer] ),
SWITCH (
SELECTEDVALUE ( 'Slicer table'[Slicer] ),
"Last 30 days", [Last 30 days],
"Today", [Today]
),
IF ( ISFILTERED ( 'Table'[Past month] ), [MTD], "Please selected a slicer" )
)
``````

Attached a sample file in the below, hopes it could help.

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

Helper IV

Thank @v-yingjl

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.