The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi, guys, I need to create an auxiliary dcalendar to use in a line graph only the date from the range of the date selected by the user.
In the case of the chart above, I would like to show the data from 12/31/2019, the last day of the year before the selected date, until 01/06/2020, which is the selected date. When I try to create a range using datesbetwenn it doesn't understand the range. Is it possible to do this with dax?
@STEPH0018 So, you would want your calendar table disconnected from your slicer and then you could do this:
Measure =
VAR __MaxDate = SELECTEDVALUE('Slicer'[Date])
VAR __MinDate = DATE(YEAR(__MaxDate)-1,12,31)
VAR __CurrentDate = MAX('DateAxisTable'[Date])
RETURN
IF(__CurrentDate >= __MinDate && __CurrentDate <= __MaxDate,[your measure to display],BLANK())
The idea would be how to put the two dates here automatically:
I, Greg, so I would like to make the change only to the graph, not the measure. A filter in the visual to show just before the user-selected date until the last day of the previous year, measurement values do not change. But quaht would be the 'Slicer'[Date]?
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |