Forum Discussion
Time selector
- 9 years ago
Hi Noak,
Cause you need 4 selections so I create filter table by "Enter data" option as Period table in picture
Create new Measure with swtich options based on user's selection:
Calcualted Measure - Value = if(HASONEVALUE('Filters'[Period]), SWITCH(FIRSTNONBLANK('Filters'[Period],'Filters'[Period]), "Last 24h",CALCULATE(sum(SampleData[Value]),FILTER(SampleData,SampleData[Date] >= NOW()-1 )), "Last Week",CALCULATE(sum(SampleData[Value]),FILTER(SampleData,SampleData[Date] >= NOW()-7 )), "Last Month",CALCULATE(sum(SampleData[Value]),FILTER(SampleData,SampleData[Date] >= NOW()-35 )), "Last Year",CALCULATE(sum(SampleData[Value]),FILTER(SampleData,SampleData[Date] >= NOW()-365 )), BLANK() ) )(Not sure meaning of 13 months, so i let it minus 365 days, you could modify it)
In case you want to change the scenario with YTD, MTD, today, this week, this month, this year. You could use equal express with Today() or Month(Today()), Weeknum(Today()), Year(today())
If this works for you please accept it as solution and also give KUDOS.
It's your value field. You have 5 measures value in chart in the picture, don't you? or if you are counting number of countries, you could replace the sum(sample[value]) by count(SheetName[FieldColumn])] to fit your case.
Hi tringuyenminh92,
still I dont understand what you mean, My chart dont focuse on country:
let me explaing:
the chrt present:
1.Date= every 5 minutes date +time
2.MSG type(7 different types)
3.Provider(5 providers)
4.Site(5 sites)
My bar chart presentS: avg MSG count by date & MSG type
In order to present the data respectivly I need dynamic selector.
now the only missing part for me is the value column , please help.