Forum Discussion
Greger1337
7 years agoFrequent Visitor
Filter X-axis
I have as measure calculating sales of last 18 months: Volume_18M = CALCULATE([Fsg volym];FILTER(Datum;Datum[Date]>DATE(YEAR(TODAY());MONTH(TODAY())-18;DAY(TODAY())))) In a bar chart I want to disp...
- 7 years ago
Unfortunatley this filters the categories on my X-axis if there is no data for the Year-Month.
I managed to get it working with this measure:
Volym_18M = CALCULATE( IF([Fsg volym]=0 && (LASTDATE(Datum[Date]) > DATE(YEAR(TODAY());MONTH(TODAY())-18;DAY(TODAY())) && LASTDATE(Datum[Date]) < TODAY()) ;0;[Fsg volym]); FILTER(Datum;Datum[Date]>DATE(YEAR(TODAY());MONTH(TODAY())-18;DAY(TODAY()))))
kaushikd
7 years agoResolver II
You can use the page level filter or visual level filter to get the last 18 month Volume, no need of writing dax for that. Try this and let me know if that fix your problem.
For more details you can follow this link
- Greger13377 years agoFrequent Visitor
Unfortunatley this filters the categories on my X-axis if there is no data for the Year-Month.
I managed to get it working with this measure:
Volym_18M = CALCULATE( IF([Fsg volym]=0 && (LASTDATE(Datum[Date]) > DATE(YEAR(TODAY());MONTH(TODAY())-18;DAY(TODAY())) && LASTDATE(Datum[Date]) < TODAY()) ;0;[Fsg volym]); FILTER(Datum;Datum[Date]>DATE(YEAR(TODAY());MONTH(TODAY())-18;DAY(TODAY()))))