Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I need measure for Deliveries table , wich counts rows for each combination 'New, Modified, Repeat' (Type, in matrix as row) and 'Roof, Wall, Floor, Stair' (Design, in matrix as column) in each cell, where data is, but ignore Days column context (in matrix as row). Table filtered by DeliveryDate column in related (many to one) table Surveys. In right table — what i have with COUNTROWS('Deliveries'), in left table — marked sample of expected result. Could you help me please?
Hi, @YKarpenko
Can you provide a simple PBIX file for testing? Sensitive information can be removed in advance.
Best Regards
@v-zhangti I'm resolved this issue by creating next table:
DeliveriesCount =
GROUPBY(
FILTER(
ALLSELECTED('Deliveries'),
Deliveries[Days] <> "Late"
),
'Deliveries'[Type],
'Deliveries'[Design],
'Deliveries'[CustomerOrderId],
'Deliveries'[Days],
"Count", COUNTX(
CURRENTGROUP(),
'Deliveries'[RelatedDesignId]
)
)
Thank guys for your advices
Table 1 being your deliveries table
table 2 being your Days dimension table
@Anonymous result as in previous case. I tried CALCULATE( COUNTROWS('Deliveries'), ALLSELECTED(Days[Days]) )
@amitchandak, thanks. I tried CALCULATE( COUNTROWS('Deliveries'), REMOVEFILTERS(Deliveries[Days]) ) (right table), but result the same as just with COUNTROWS('Deliveries') (left table). What I'm doing wrong?
Example of expected result
@YKarpenko , In your, measure add removefilters(Table[Days])
Assume you are using M1 measure in left
M2 = calculate([M1],removefilters(Table[Days]) )
User | Count |
---|---|
102 | |
88 | |
78 | |
71 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |