Forum Discussion
Anonymous
7 years agoNot applicable
Creating a weighted graph using DAX / COUNT
Hello Power BI community, I am a novice in Power BI DAX syntax writing and am desperate for assistance on a problem at work. Here's the short of it: I have one table which has the RAW data be...
- 7 years ago
Hi Anonymous,
Based on my understanding, WeightedTable contains fields: [Brand], [Item] and [Weighted Number], RawTable contains [Brand] and [Item].
Please create measure as below:
weighted value = CALCULATE ( MAX ( 'Weighted Table'[Weighted Number] ), FILTER ( ALL ( 'Weighted Table' ), 'Weighted Table'[Brand] = SELECTEDVALUE ( 'Raw Table'[Brand] ) && 'Weighted Table'[Item] = SELECTEDVALUE ( 'Raw Table'[Item] ) ) ) count item = COUNT('Raw Table'[Item])/'Raw Table'[weighted value]Best regards,
Yuliana Gu
v-yulgu-msft
7 years agoMicrosoft Employee
Hi Anonymous,
Based on my understanding, WeightedTable contains fields: [Brand], [Item] and [Weighted Number], RawTable contains [Brand] and [Item].
Please create measure as below:
weighted value =
CALCULATE (
MAX ( 'Weighted Table'[Weighted Number] ),
FILTER (
ALL ( 'Weighted Table' ),
'Weighted Table'[Brand] = SELECTEDVALUE ( 'Raw Table'[Brand] )
&& 'Weighted Table'[Item] = SELECTEDVALUE ( 'Raw Table'[Item] )
)
)
count item = COUNT('Raw Table'[Item])/'Raw Table'[weighted value]
Best regards,
Yuliana Gu