Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I want to create dax measure for below scenario. Can some please help
Table1:
Id | Type | Offer | Value |
1 | R1 | A | 100 |
1 | R1 | C | 100 |
1 | R2 | C | 100 |
1 | R2 | A | 100 |
Table2:
Id | Name |
1 | PBI |
Table1 & Table2 are related based on Id.
Expected Results : For selected Column, I should perform group by operation and get First Value for that group
Expected Result1:
Name | Value |
PBI | 100 |
Expected Result2:
Type | Name | Value |
R1 | PBI | 100 |
R2 | PB1 | 100 |
Thanks,
Abhiram
Solved! Go to Solution.
@abhiram342 , Hope both tables are joined on ID
Use a measure like this for value
Measure =
VAR __id = MAX ('Table'[ID] )
VAR __date = CALCULATE ( Min('Table'[Offer] ), ALLSELECTED ('Table' ), 'Table'[ID] = __id )
return
CALCULATE ( sum ('Table'[Value] ), VALUES ('Table'[ID] ),'Table'[ID] = __id,'Table'[Offer] = __date )
All columns are from table1 here . Use ID from Table 1 in visual
@abhiram342 , Hope both tables are joined on ID
Use a measure like this for value
Measure =
VAR __id = MAX ('Table'[ID] )
VAR __date = CALCULATE ( Min('Table'[Offer] ), ALLSELECTED ('Table' ), 'Table'[ID] = __id )
return
CALCULATE ( sum ('Table'[Value] ), VALUES ('Table'[ID] ),'Table'[ID] = __id,'Table'[Offer] = __date )
All columns are from table1 here . Use ID from Table 1 in visual
Thanks @amitchandak For each Id the value is same. Intially, I have designed model as below and was doing max for each selected column but it didn't worked.
Example: For Offer A, I should get 300 . Please let me know If I need to update the measure
Table2:
Id | Value |
1 | 100 |
2 | 200 |
Table1:
Id | Type | Offer |
1 | R1 | A |
1 | R1 | C |
1 | R2 | C |
1 | R2 | A |
2 | R3 | A |
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |