Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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]
)
Please help
Solved! Go to Solution.
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.
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.
User | Count |
---|---|
102 | |
91 | |
87 | |
79 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
73 | |
65 |