The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I would like to add one more columns, which would be equal to the first line of each set of records.
Column1 Column2 Column3
A RV 100
A AB 80
A AB 30
B RV 200
B AB 120
B AB 70
Would expect:
Column1 Column2 Column3 Column4
A RV 100 100
A AB 80 100
A AB 30 100
B RV 200 200
B AB 120 200
B AB 70 200
Thanks a lot!
Solved! Go to Solution.
Hi @jiangxm80 ,
For the first question, you can try:
result =
VAR _FIRST=CALCULATE(MIN('Table'[Index]),ALLEXCEPT('Table','Table'[Column1]))
RETURN LOOKUPVALUE('Table'[Column3],'Table'[Index],_FIRST)
As for the second question that use the RV:
You can try this method:
New column:
Column =
CALCULATE (
MAX ( 'Table'[Column3] ),
FILTER (
'Table',
'Table'[Column2] = "RV"
&& 'Table'[Column1] = EARLIER ( 'Table'[Column1] )
)
)
The result is:
Hope this helps you. Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
@jiangxm80
Try This one
Measure=Calculate(Max(Column3 ),ALLEXCEPT(Column1))
Thanks,
Thennarasu
could you please help me a little bit on this? Thanks
Hi @jiangxm80 ,
For the first question, you can try:
result =
VAR _FIRST=CALCULATE(MIN('Table'[Index]),ALLEXCEPT('Table','Table'[Column1]))
RETURN LOOKUPVALUE('Table'[Column3],'Table'[Index],_FIRST)
As for the second question that use the RV:
You can try this method:
New column:
Column =
CALCULATE (
MAX ( 'Table'[Column3] ),
FILTER (
'Table',
'Table'[Column2] = "RV"
&& 'Table'[Column1] = EARLIER ( 'Table'[Column1] )
)
)
The result is:
Hope this helps you. Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, could I set the logic to get value via Column2, which is RV?
Hi,
This is my solution :
1) create another table based on the existing table as below :
Appreciate your Kudos and please mark it as a solution if it helps you.
Thanks, could I set the logic to get value via Column2, which is RV?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
80 | |
77 | |
46 | |
39 |
User | Count |
---|---|
141 | |
110 | |
64 | |
64 | |
53 |