The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi community,
I need calculate a weighted average and i have this condition:
Weight:
Weight = SUMX('Table',
IF([category]="XPTO1" &&
MONTH('Table'[Date]) = MONTH(IF(DISTINCTCOUNT('Table'[Date])>1, NOW(),[Date])) &&
YEAR'Table'[Date]) = YEAR(IF(DISTINCTCOUNT('Table'[Date])>1, NOW(),[Date]))
,[total])
)
Value:
value= Weight = SUMX('Table',
IF([category]="XPTO2" &&
MONTH('Table'[Date]) = MONTH(IF(DISTINCTCOUNT('Table'[Date])>1, NOW(),[Date])) &&
YEAR'Table'[Date]) = YEAR(IF(DISTINCTCOUNT('Table'[Date])>1, NOW(),[Date]))
,[total])
)
Can help me?
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |