Forum Discussion
ghouse_peer
2 years agoPost Patron
Default value - Current Month Value
Hi Team, I have a requirement. I have a card Visual. and Slicer for month. 1.when i open report, in a card visual it should show current month value as default. 2. when we select month ...
- Anonymous2 years ago
Hi ghouse_peer ,
Below is my table:
The following DAX might work for you:
Measure 1 = SELECTEDVALUE('Table (2)'[Reporting]) Measure 2 = var dat1 = MONTH(TODAY()) var dat2 = MONTH('Table (2)'[Measure 1]) var result = CALCULATE( MIN('Table (2)'[MothValue]), FILTER('Table (2)',dat2 = dat1) ) var result2 = CALCULATE( MIN('Table (2)'[MothValue]), FILTER('Table (2)',dat2 <> dat1) ) var result1 = IF(dat1 = dat2 , result , result2) return result1The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi ghouse_peer ,
Below is my table:
The following DAX might work for you:
Measure 1 =
SELECTEDVALUE('Table (2)'[Reporting])
Measure 2 =
var dat1 = MONTH(TODAY())
var dat2 = MONTH('Table (2)'[Measure 1])
var result =
CALCULATE(
MIN('Table (2)'[MothValue]),
FILTER('Table (2)',dat2 = dat1)
)
var result2 =
CALCULATE(
MIN('Table (2)'[MothValue]),
FILTER('Table (2)',dat2 <> dat1)
)
var result1 =
IF(dat1 = dat2 , result , result2)
return result1
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.