Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm building a Copilot report, using CopilotReadinessActivityUserDetail information, and joining with user and date enabled for Copilot which is coming from another table.
In the CopilotReadinessActivityUserDetail table, I have a column called "Report Refresh Date", which is the extract data for the data. Every row hasd the same value, so for example I can see the date uploaded on a card with a measure of
Solved! Go to Solution.
Hi @Anonymous ,
From the error messages you've shared, it seems like you're attempting to use DAX functions within Power Query's M language environment, which will not work since these are separate environments with different functions and syntaxes.
Please try like:
if [IsMember]=1 then Duration.TotalDays(List.Max(#"CopilotReadinessActivityUserDetail"[#"Report Refresh Date"]) - [DateAuthorized]) else null
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi @Anonymous ,
From the error messages you've shared, it seems like you're attempting to use DAX functions within Power Query's M language environment, which will not work since these are separate environments with different functions and syntaxes.
Please try like:
if [IsMember]=1 then Duration.TotalDays(List.Max(#"CopilotReadinessActivityUserDetail"[#"Report Refresh Date"]) - [DateAuthorized]) else null
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Thanks so much for this, and it fixed it for me. I broke out the steps to see what was happening, as follows:
1. Added Custom1:
= Table.AddColumn(#"Added Custom", "CopilotActivityLatestDate", each
List.Max(#"CopilotReadinessActivityUserDetail"[#"Report Refresh Date"])
)
2. Added Custom2:
= Table.AddColumn(#"Added Custom1", "DaysSinceAdded", each
if [IsMember]=1 then
Duration.Days(DateTime.Date([CopilotActivityLatestDate]) - DateTime.Date([DateAdded]))
else null
)
3. Changed Type:
= Table.TransformColumnTypes(#"Added Custom2",{{"DaysSinceAdded", type number}})
The List.Max syntax was the key thing for me, and understanding M syntax versus DAX. Also the way to quote a literal for the other table, then the other table's column - as #"OtherTable"[#"OtherColumn"].
You seem to be trying to run DAX commands inside of Power Query. While that is possible to some extent, it's not done the way you are trying here.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
13 | |
11 | |
8 | |
8 |
User | Count |
---|---|
17 | |
10 | |
7 | |
7 | |
7 |