Forum Discussion
How to replace 2 GL expense expression into 1 ?
Hi All
I have make a post below :-
with the help from jdbuchanan71 i get the below expression working fine :-
May i know how to convert the above expression into 1 , So user need only click on the :-
month = 2 , get Current month - 1 EXP_
month = 1 , get Current month - 2 EXP_
Enclosed below is my PBI file :-
Paul
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
2 Replies
- amitchandakSuper User
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- admin11Memorable Member