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.
FilteredProjects =
FILTER (
gold_procon_projekte_historical,
gold_procon_projekte_historical[valid_from] <= SELECTEDVALUE(gold_procon_stammdaten[stamm_daten]) &&
(
gold_procon_projekte_historical[valid_to] >= SELECTEDVALUE(gold_procon_stammdaten[stamm_daten]) ||
ISBLANK(gold_procon_projekte_historical[valid_to]) &&
gold_procon_projekte_historical[is_current] = TRUE()
)
)
Solved! Go to Solution.
@andicornejo12 - Try this:
FILTER (
ALL(gold_procon_projekte_historical[valid_from], gold_procon_projekte_historical[valid_to], gold_procon_projekte_historical[is_current]),
gold_procon_projekte_historical[valid_from] <= SELECTEDVALUE(gold_procon_stammdaten[stamm_daten]) &&
(
gold_procon_projekte_historical[valid_to] >= SELECTEDVALUE(gold_procon_stammdaten[stamm_daten]) ||
ISBLANK(gold_procon_projekte_historical[valid_to]) &&
gold_procon_projekte_historical[is_current] = TRUE()
)
)
Essentially I'm applying the filters to the specific columns inside the ALL(), rather than the whole table.
If this works for you, please accept it as the solution, it will helpwith visibility for others with the same problem.
hello @mark_endicott
Thank you so much for your answer. Unfortunately I keep getting the same error message:
@andicornejo12 - Are you attempting to use this DAX in a measure?
If so, that's likely to the problem. At the table level, the result for the flag could be both TRUE and FALSE based on the row, and a measure requires a scalar value.
If you are using a measure, try this:
VAR _table =
ADDCOLUMNS (
gold_procon_projekte_historical,
"@flag",
IF (
gold_procon_projekte_historical[valid_from]
<= SELECTEDVALUE ( gold_procon_stammdaten[stamm_daten] )
&& (
gold_procon_projekte_historical[valid_to]
>= SELECTEDVALUE ( gold_procon_stammdaten[stamm_daten] )
|| ISBLANK ( gold_procon_projekte_historical[valid_to] )
&& gold_procon_projekte_historical[is_current] = TRUE ()
),
1,
0
)
)
RETURN
MAXX ( _table, [@flag] )
It will change your flag to a integer of 1 or 0, but it can now be applied at the row level. I have tested it and it appears to be working fine for me:
@andicornejo12 - Try this:
FILTER (
ALL(gold_procon_projekte_historical[valid_from], gold_procon_projekte_historical[valid_to], gold_procon_projekte_historical[is_current]),
gold_procon_projekte_historical[valid_from] <= SELECTEDVALUE(gold_procon_stammdaten[stamm_daten]) &&
(
gold_procon_projekte_historical[valid_to] >= SELECTEDVALUE(gold_procon_stammdaten[stamm_daten]) ||
ISBLANK(gold_procon_projekte_historical[valid_to]) &&
gold_procon_projekte_historical[is_current] = TRUE()
)
)
Essentially I'm applying the filters to the specific columns inside the ALL(), rather than the whole table.
If this works for you, please accept it as the solution, it will helpwith visibility for others with the same problem.
hello @mark_endicott
Thank you so much for your answer. Unfortunately I keep getting the same error message:
Thanks so much!
Yes it did work for me too 😊
@andicornejo12 - Are you attempting to use this DAX in a measure?
If so, that's likely to the problem. At the table level, the result for the flag could be both TRUE and FALSE based on the row, and a measure requires a scalar value.
If you are using a measure, try this:
VAR _table =
ADDCOLUMNS (
gold_procon_projekte_historical,
"@flag",
IF (
gold_procon_projekte_historical[valid_from]
<= SELECTEDVALUE ( gold_procon_stammdaten[stamm_daten] )
&& (
gold_procon_projekte_historical[valid_to]
>= SELECTEDVALUE ( gold_procon_stammdaten[stamm_daten] )
|| ISBLANK ( gold_procon_projekte_historical[valid_to] )
&& gold_procon_projekte_historical[is_current] = TRUE ()
),
1,
0
)
)
RETURN
MAXX ( _table, [@flag] )
It will change your flag to a integer of 1 or 0, but it can now be applied at the row level. I have tested it and it appears to be working fine for me:
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |