Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Good evening everyone!
I havent been able to solve a DAX sintax. I need to create a table with some columns from a bigger table. However, I need to bring data by two conditions.
The first is condition is to bring all data that says "yes" in the signed off column. And the second condition is to bring the last value updated when encountered the same client twice for the same country (my example 2 times for colombia)
I´ve been using this code but its not working. What am I doing wrong? I would appreciate any feedbak. Thanks in advance.
Solved! Go to Solution.
You are not comparing the max of the Created column with anything, so to convert the max date to a boolean expression it will be treating 0 as false and non-zero as true, so all your rows will match that condition. You could use a variable to capture the max value and then compare it to the created value for the current row.
eg
TPCC Clients =
SUMMARIZE (
FILTER (
'Share Point',
VAR maxCreated =
MAX ( 'Share Point'[Created] )
RETURN
'Share Point'[Created] = maxCreated
&& CONTAINSSTRING ( 'Share Point'[Signed Off], "yes" )
),
'Share Point'[Region],
'Share Point'[Delivery Countries],
'Share Point'[Client Holding Name],
'Share Point'[Created]
)
You are not comparing the max of the Created column with anything, so to convert the max date to a boolean expression it will be treating 0 as false and non-zero as true, so all your rows will match that condition. You could use a variable to capture the max value and then compare it to the created value for the current row.
eg
TPCC Clients =
SUMMARIZE (
FILTER (
'Share Point',
VAR maxCreated =
MAX ( 'Share Point'[Created] )
RETURN
'Share Point'[Created] = maxCreated
&& CONTAINSSTRING ( 'Share Point'[Signed Off], "yes" )
),
'Share Point'[Region],
'Share Point'[Delivery Countries],
'Share Point'[Client Holding Name],
'Share Point'[Created]
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 35 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 136 | |
| 96 | |
| 77 | |
| 67 | |
| 65 |