Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Please share your sample pbix file's link, and then I can see what other columns are also involved. In the picture, I could not see what is under Category column in the visualization.
Thanks.
Hi,
Thank you for your message.
expected result measure: =
VAR _t =
ADDCOLUMNS (
FILTER (
ALL ( Data ),
Data[Category] = MAX ( Category[Category] )
&& Data[StartDate] <= MAX ( 'Calendar'[Date] )
&& Data[EndDate] >= MIN ( 'Calendar'[Date] )
),
"@daycount",
SWITCH (
TRUE (),
Data[EndDate] > MAX ( 'Calendar'[Date] )
&& Data[StartDate] < MIN ( 'Calendar'[Date] ),
MAX ( 'Calendar'[Date] ) - MIN ( 'Calendar'[Date] ) + 1,
Data[EndDate] > MAX ( 'Calendar'[Date] )
&& Data[StartDate] >= MIN ( 'Calendar'[Date] ),
MAX ( 'Calendar'[Date] ) - Data[StartDate] + 1,
Data[EndDate] <= MAX ( 'Calendar'[Date] )
&& Data[StartDate] < MIN ( 'Calendar'[Date] ),
Data[EndDate] - MIN ( 'Calendar'[Date] ) + 1,
Data[EndDate] <= MAX ( 'Calendar'[Date] )
&& Data[StartDate] >= MIN ( 'Calendar'[Date] ),
Data[EndDate] - Data[StartDate] + 1
)
)
RETURN
DIVIDE ( SUMX ( _t, [@daycount] ), COUNTROWS ( _t ) )
Hi,
Please share your sample pbix file's link, and then I can see what other columns are also involved. In the picture, I could not see what is under Category column in the visualization.
Thanks.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
expected result measure: =
VAR _t =
ADDCOLUMNS (
FILTER (
Data,
Data[StartDate] <= MAX ( 'Calendar'[Date] )
&& Data[EndDate] >= MIN ( 'Calendar'[Date] )
),
"@daycount",
SWITCH (
TRUE (),
Data[EndDate] > MAX ( 'Calendar'[Date] )
&& Data[StartDate] < MIN ( 'Calendar'[Date] ),
MAX ( 'Calendar'[Date] ) - MIN ( 'Calendar'[Date] ) + 1,
Data[EndDate] > MAX ( 'Calendar'[Date] )
&& Data[StartDate] >= MIN ( 'Calendar'[Date] ),
MAX ( 'Calendar'[Date] ) - Data[StartDate] + 1,
Data[EndDate] <= MAX ( 'Calendar'[Date] )
&& Data[StartDate] < MIN ( 'Calendar'[Date] ),
Data[EndDate] - MIN ( 'Calendar'[Date] ) + 1,
Data[EndDate] <= MAX ( 'Calendar'[Date] )
&& Data[StartDate] >= MIN ( 'Calendar'[Date] ),
Data[EndDate] - Data[StartDate] + 1
)
)
RETURN
DIVIDE ( SUMX ( _t, [@daycount] ), COUNTROWS ( _t ) )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 9 | |
| 8 | |
| 7 |