Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a table that has Date column and Value column. I am using SQL Server with DirectQuery mode. I need to build a chart that has latest values for each of 2 last days. Should look like here:
Here is a table:
To achieve this I decided to create two calculated columns for X (days) and Y (values) axes. But I encountered issues when functions like MAX (to get most recent date) or FORMAT (to format date to "Fri" or "Sat") are not supported using DirectQuery in calculated columns. Does somebody have an idea how can I solve it?
Hi @andriikubrak,
1. How to add dates like "Fri"?
1) If you can add a week column in the database, you can try to add a new column in the PBI.
Week = LEFT ( [Day of Week], 3 )
2) If you can't, I wound if you can accept the format like this: "Sunday 1 January 2017".
2. About Max. Does the second max date have some features? For example, it's the max date minus 1.
Because "Function 'FILTER' is not supported in this context in DirectQuery mode". We can't use filter to get the second max date. Or you have to do it in the database.
Best Regards!
Dale
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
87 | |
65 | |
50 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |