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.
Here is the dataset:
Year Type Value
2023 | a | 20 |
2023 | b | 50 |
2023 | c | 30 |
Here is the Visual: I want to see percentage when hover over a category:
Here is how to make the visual:
Here is the DAX I used to make the code:
Measure =
var a = sum('Table'[Value])
var b = if(HASONEVALUE('Table'[Type]), max('Table'[Value]) )
return b / a
But the result does not show an accurate percentage when hovered:
Expected result: 30/100 = 30% and not 100%
Solved! Go to Solution.
Hi @bipowerbix
Please try
Measure =
DIVIDE (
SUM ( 'Table'[Value] ),
CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table'[Type] ) )
)
Hi @bipowerbix
Please try
Measure =
DIVIDE (
SUM ( 'Table'[Value] ),
CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table'[Type] ) )
)
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |