Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Last X Days Buttons

Hi,

I wanted to add a Button Feature, where I can easily change the Date Range. 
I tried to do it with parameter and meassures, but somehow I didnt managed to achive anything that is working 😄

 

 

last12monthGoodsReceipts = 
CALCULATE (
    COUNTROWS('SCR'),
    DATESINPERIOD('SCR'[Goods receipt date], TODAY(), -12, MONTH)
)

 

 

I tried do it for last 3, 6 & 12 months somehow like this.



My Parameter:

Parameter = {
    ("Letzten 90 Tage", NAMEOF('Meassures'[last3monthGoodsReceipts]), 0, "✓"),
    ("Letzten 182 Tage", NAMEOF('Meassures'[last6monthGoodsReceipts]), 1, "✓ "),
    ("Letzten 365 Tage", NAMEOF('Meassures'[last12monthGoodsReceipts]), 2, "✓  ")
}

So my buttons dont change anything and I dont know what to do. 
(Im also new to PowerBI).

Maybe someone knows a way and could me give me a guideline or something...
Thank you 🙂