Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have data 1 in following format:
Header | value |
A | 1 |
A | 1 |
A | 1 |
A | 1 |
A | 1 |
A | 1 |
A | 1 |
A | 1 |
B | 1 |
B | 1 |
B | 1 |
B | 1 |
B | 1 |
B | 1 |
B | 1 |
B | 1 |
B | 1 |
C | 1 |
C | 1 |
C | 1 |
C | 1 |
C | 1 |
C | 1 |
C | 1 |
C | 1 |
C | 1 |
D | 1 |
D | 1 |
D | 1 |
D | 1 |
D | 1 |
D | 1 |
D | 1 |
D | 1 |
and data 2 in following format
Header | Count |
A | 10 |
B | 20 |
C | 20 |
D | 10 |
I am expecting to create a table visual in power bi which will give me following output
header | data1_value | data2_count | final |
A | 8 | 10 | 0.8 |
B | 9 | 20 | 0.45 |
C | 9 | 20 | 0.8 |
D | 8 | 10 | 0.45 |
Can you help me to write a DAX measure to achieve final column
Hi, @ERAHUMO
@ERAHUMO
try below
make two measure
juast adjust your table and column name
a1= COUNTX('data1','data1'[value])
and
countfinal = DIVIDE([a1],MAX('data2'[Count]))
plot table visual and put column and above measure you get like below
OR
you can make a new table
just adjust your table and column name
Table 3 =
ADDCOLUMNS(ALL('data2'[Header]),
"data1",CALCULATE(COUNT('data1'[value])),
"count",CALCULATE(MAX('data2'[Count])),
"countfinal",
DIVIDE(
CALCULATE(
COUNT('data1'[value])
),
CALCULATE(
MAX('data2'[Count])
)
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
8 |