Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi, I have a problem. I cannot find proper command. I have a table for example there will be 3 column. Data1, Data2, Data3
In Data1 values are unique, in Data2 there are values from Data1 but not in all. I would like to find the value in column Date3 from column Date1 where the value in column Date2 occurs. I tried LOOKUPVALUE but somehow it does not work properly.
any suggestion?
Solved! Go to Solution.
In Power BI DAX, you can use the RELATED function along with FILTER to achieve this. Assuming your table is named "YourTable" and the columns are named "Data1," "Data2," and "Data3," you can create a calculated column for "Data3" using the following DAX formula:
Data3 =
CALCULATE(
MAX(YourTable[Data1]),
FILTER(
YourTable,
YourTable[Data2] = EARLIER(YourTable[Data2])
)
)
In Power BI DAX, you can use the RELATED function along with FILTER to achieve this. Assuming your table is named "YourTable" and the columns are named "Data1," "Data2," and "Data3," you can create a calculated column for "Data3" using the following DAX formula:
This formula calculates the maximum value of "Data1" for each row in the table where "Data2" is equal to the current row's "Data2."
Here's a breakdown of the formula:
This way, the calculated column "Data3" will contain the corresponding "Data1" value for each row where "Data2" matches.
Hi Thanks but It is not working quite good. I have recived:
while I'm expecting to recive this. This is of coures table to test.
Data 1 | Data 2 | Data3 |
1 | 3 | |
2 | ||
3 | 1 | 6 |
4 | ||
5 | 9 | |
6 | 3 | |
7 | ||
8 | ||
9 | 5 | |
10 |
I have made a little change and it works
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
15 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |