Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I need date filter in which it should have both Month wise and current YTD .
Example -
From the above SS, i can select month wise data also Current YTD (i.e., 2021 YTD)
Please help me to resolve this.
Thanks,
Mohanraj
@amitchandak @Jihwan_Kim @Fowmy
Solved! Go to Solution.
Hi @mogunase1 ,
Please follow the below steps to get it:
1. Create a auxiliary table, you can refer the solution in the following thread:
Looking for difference between two values by filters
Table 2 = UNION ( VALUES ( 'Table'[MonthYear] ), ROW ( "MonthYear", "YTD" ) )
2. Create a measure as below to get the different value base on MonthYear selection (current year YTD and normal aggregation)
Measure =
SWITCH (
SELECTEDVALUE ( 'Table 2'[MonthYear] ),
"YTD",
TOTALYTD (
SUM ( 'Table'[# of incidents] ),
'Table'[Date],
YEAR ( 'Table'[Date] ) = YEAR ( TODAY () )
),
CALCULATE (
SUM ( 'Table'[# of incidents] ),
FILTER ( 'Table', 'Table'[MonthYear] = SELECTEDVALUE ( 'Table 2'[MonthYear] ) )
)
)
3. Create a slicer base on the field [MonthYear] of Table 2
Best Regards
Hi @mogunase1 ,
Please follow the below steps to get it:
1. Create a auxiliary table, you can refer the solution in the following thread:
Looking for difference between two values by filters
Table 2 = UNION ( VALUES ( 'Table'[MonthYear] ), ROW ( "MonthYear", "YTD" ) )
2. Create a measure as below to get the different value base on MonthYear selection (current year YTD and normal aggregation)
Measure =
SWITCH (
SELECTEDVALUE ( 'Table 2'[MonthYear] ),
"YTD",
TOTALYTD (
SUM ( 'Table'[# of incidents] ),
'Table'[Date],
YEAR ( 'Table'[Date] ) = YEAR ( TODAY () )
),
CALCULATE (
SUM ( 'Table'[# of incidents] ),
FILTER ( 'Table', 'Table'[MonthYear] = SELECTEDVALUE ( 'Table 2'[MonthYear] ) )
)
)
3. Create a slicer base on the field [MonthYear] of Table 2
Best Regards
https://www.dropbox.com/s/lhhkd48kzre6tdk/mogv4.pbix?dl=0
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@mogunase1 , You need to create an independent table, and based on each value you need to make a decision.
If (selectedvalue(Slicer[Slicer]) ="YTD", [YTD Measure], [Monthy Measure])
Make sure you need to handle these value in you monthly measure too.
User | Count |
---|---|
106 | |
89 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |