Forum Discussion
How to replace 2 GL expense expression into 1 ?
- 5 years ago
admin11 , One way is you give him what if parameter and use that -https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Current month - 1 EXP_ =
VAR _Start = EOMONTH ( TODAY (), -1 * selectedvalue(Whatif[Value]) -1 ) + 1
VAR _End = EOMONTH ( _Start, 0 )
RETURN
CALCULATE ( [AMOUNT_EXP], DATESBETWEEN ( 'Date'[Date], _Start, _End ) )or you can measure slicer to create button or list
measure slicer
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern
admin11 , One way is you give him what if parameter and use that -https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Current month - 1 EXP_ =
VAR _Start = EOMONTH ( TODAY (), -1 * selectedvalue(Whatif[Value]) -1 ) + 1
VAR _End = EOMONTH ( _Start, 0 )
RETURN
CALCULATE ( [AMOUNT_EXP], DATESBETWEEN ( 'Date'[Date], _Start, _End ) )
or you can measure slicer to create button or list
measure slicer
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern