Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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 ) )
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |