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 All,
I want to calculate average of Item Cost/NetPrice % column by Subcategory. This column is a measure. Could you help me about this?
It has to be like (28,01%+41,43%+23,98%)/3(Carpaccio category has 3 Item)=31,14% after this I will compare Item Cost/NetPrice % with new average. This has to be for each subcategory.
Solved! Go to Solution.
Hi @CetinT
please try
Subcategory Average =
AVERAGEX (
CALCULATETABLE ( VALUES ( 'Product'[Product] ), ALL ( 'Product'[Product] ) ),
[Item Cost/NetPrice %]
)
Hi @CetinT
please try
Subcategory Average =
AVERAGEX (
CALCULATETABLE ( VALUES ( 'Product'[Product] ), ALL ( 'Product'[Product] ) ),
[Item Cost/NetPrice %]
)
Thanks a lot. This measure solved my problem. 👋
Please show the underlaying data structure. Are there measures or other tables involved?
Proud to be a Super User!
There is Product and Transaction tables. Max Net Price and Max Cost Price are measures and dividing Max Cost Price to Max Net Price to finding ItemCost/NetPrice % as a measure
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
8 | |
8 |