Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
I am trying to use field parameters to change the axis on a column chart that displays a measure.
The measure being displayed is as follows:
DashboardCore =
Var Maximumdate = CALCULATE(MAX('DateTable'[DateTime]),ALLSELECTED('DateTable'[DateTime]))
Var Minimumdate = IF([SelectedFilter]="Single Week",CALCULATE(MIN('DateTable'[DateTime]),ALLSELECTED('DateTable'[DateTime])),CALCULATE(MIN('DateTable'[FinancialYearStart]),ALLSELECTED('DateTable'[DateTime])))
Return CALCULATE (
SUM ('Visitors'[Visitors Actual]),
ALL ('DateTable'),
'DateTable'[DateTime] <= Maximumdate,
'DateTable'[DateTime] >= Minimumdate
)
I know this measure produces the correct totals as I have the figures displaying on cards elsewhere in the report. I have a slicer running from the SelectedFilter table that allows users to view for a single week, or the year to date for the date selected.
I would like to be able to change the x axis of my chart to view totals split by hour, week day or month. I have added these three fields (all of which are in the datetime table) to a set of field parameters.
This works well for week day and hour, but for the monthly view, all of the data appears in the month of the date selected in my slicer, rather than the date from the Visitors table.
I'm assuming that this is something to do with the way I've filtered the data in the variables at the beginning of my measure, but I'm unsure how to change this whilst maintaining both bits of functionality.
Many thanks in advance for your help.
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |