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.
Dear All,
i am using a Matric in Power BI desktop and i have data like below
I know how to dynamically manipulate the grand total as average.
but here i need total column of Uk with sum and other rows with average.
could you please help me out with logic?
refer to this link for more.
https://docs.google.com/spreadsheets/d/1ZJz1XlfpGcnBzaiC070lAfJpjy2_1VhRcj541EcHNSo/edit?usp=sharing
@amitchandak @Pragati11
UK sum and others avg : =
IF (
HASONEVALUE ( Countries[Country] ),
SWITCH (
SELECTEDVALUE ( Countries[Country] ),
"UK", SUM ( Data[Value] ),
AVERAGE ( Data[Value] )
)
)
@Jihwan_Kim i mean what if i have states, cities and county level drill down fields in the matrix? the same measure will work for the low granularity level values?
Hi,
Thank you for your feedback.
Can you share your sample pbix file? I think it depends on how your model looks like, and also it depends on how the countries - states - cities are related.
@Jihwan_Kim thnaks for valuable time in looking into this issue.
i dint understand your question.
country will be linked to state and state will be linked to city.
when we expand the country in matrix, there will be states appear in that case our DAX measure we wrote for country how it will be impact the state level data in the same matrix?
will this work if i add more sub categories in the matrix?
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
12 | |
9 | |
8 |