Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I have a table wherein we have scrore over all the days, And i have created a datedim table which has date, year, month number and all, If i select a date from dropdown the output should be average scrore from start of that month selected to current date which is selected from drop down.
FYI, The table has many year records from 2017 to 2019. Could you please help me on this.
Thanks in Advance:
Nishanth
Solved! Go to Solution.
You can use the date table with a date slicer, so you can select the required date. assuming the date column is 'DateTable'[date], then you can create a separate measure to estimate the month to date value
MTDValue =
VAR selectedDate = SELECTEDVALUE('DateTable'[date])
VAR DateStart = DATE(YEAR(selectedDate), MONTH(selectedDate), 1)
RETURN
CALCULATE(SUM(myTable[Value]), myTable[date]>=DateStart, myTable[date]<=selectedDate)
You can use the date table with a date slicer, so you can select the required date. assuming the date column is 'DateTable'[date], then you can create a separate measure to estimate the month to date value
MTDValue =
VAR selectedDate = SELECTEDVALUE('DateTable'[date])
VAR DateStart = DATE(YEAR(selectedDate), MONTH(selectedDate), 1)
RETURN
CALCULATE(SUM(myTable[Value]), myTable[date]>=DateStart, myTable[date]<=selectedDate)
Sorry, you can use AVERAGE instead of SUM in the last calculation
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |