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.
Project Table
Project | Beginning Date | End Date | |
Project A | 1 jun | 5jun | |
Project B | 1april | 10 april |
(Virtual Table)
Project | Beginning Date | End Date | Total Days |
Project A | 1 jun | 5jun | 5 |
Project B | 1april | 10 april | 10 |
So I need to create a virtual Table where I add a column with the total days for each project, something along these lines:
var virtual table: ADDCOLUMNS(Project Table, "@Total Days", Countrows(datesbetween(Dates, Selectedvalue(Beginning Date),Selectedvalue( End date),)
Then I want to sum the newly virtual column, that in this particular case would be 5+10 = 15,
I tried with a variable "current_project" to make the Datesbetween work, and get the total days for each project row by row. But the measure does not work in the totals, and in the charts only works If I place "Project" as legend.... If I do not filter per project, it does not work.
Any help?
Many thanks
Solved! Go to Solution.
You were close. Here's your measure
Total Days = int(SUMX(ADDCOLUMNS('Project Table',"Days",'Project Table'[End Date]-'Project Table'[Beginning Date]+1),[Days]))
You were close. Here's your measure
Total Days = int(SUMX(ADDCOLUMNS('Project Table',"Days",'Project Table'[End Date]-'Project Table'[Beginning Date]+1),[Days]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
65 | |
45 | |
39 | |
31 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |