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.
Hello everyone !
- my calendar don't work anymore "calendrier = CALENDAR(01/01/2015;
TODAY())"
- when he will works how can i use it to filter a graphics to the 14 last days
- Do you have any good docs for dax language because i want to create column with the datas of others column of my database
Solved! Go to Solution.
Hi @Stuk
1) Calendrier = CALENDAR( "01/01/2015" , TODAY() ) works. You need the "" !
Calendrier = CALENDAR( DATE(2015;1;1) , TODAY() ) also works !
2) Supposing you retrieve the last 14 days in a separate table called Last14days:
Last14days = CALCULATETABLE( Calendrier , DATESINPERIOD( Calendrier[Date] ,TODAY() ,-14 , DAY) ) works fine.
You can then use :
- this brand new table Last14days as a filter in a measure with a calculate : SalesofLast14Days = Calculate ( [Total Sales] , Last14Days )
- or the date column of Last14days table as an X axis in your chart(s).
You can adjust the parameters of DatesInPeriod() whether you want to start from today() or today()-1 !
3) Please refer to my reply to this post for DAX resources.
Hope It helps you 🙂 Feel free to ask if you have any questions!
Tristan
Data & BI consultant at AZEO
Hi @Stuk
1) Calendrier = CALENDAR( "01/01/2015" , TODAY() ) works. You need the "" !
Calendrier = CALENDAR( DATE(2015;1;1) , TODAY() ) also works !
2) Supposing you retrieve the last 14 days in a separate table called Last14days:
Last14days = CALCULATETABLE( Calendrier , DATESINPERIOD( Calendrier[Date] ,TODAY() ,-14 , DAY) ) works fine.
You can then use :
- this brand new table Last14days as a filter in a measure with a calculate : SalesofLast14Days = Calculate ( [Total Sales] , Last14Days )
- or the date column of Last14days table as an X axis in your chart(s).
You can adjust the parameters of DatesInPeriod() whether you want to start from today() or today()-1 !
3) Please refer to my reply to this post for DAX resources.
Hope It helps you 🙂 Feel free to ask if you have any questions!
Tristan
Data & BI consultant at AZEO
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 |