Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
143 | |
104 | |
104 | |
80 | |
66 |