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.
Is there a way to do something like this? I only want the TREATAS filter argument to evaluate if a condition evaluates to true, otherwise I'd like the CALCULATE function to ignore the TREATAS filter argument entirely.
=CALCULATE(
[Some Measure],
IF(
[Some Table Is Filtered],
TREATAS(
VALUES(Some Table[Column]),
'Other Table'[Column]
)
)
)
Hi @kappasig504 ,
Please try the following expression where [Some Table Is Filtered] needs to return true or false depending on your data writing.
VAR IsFiltered = [Some Table Is Filtered]
VAR Result =
IF(
IsFiltered,
CALCULATE(
[Some Measure],
TREATAS(
VALUES(Some Table[Column]),
'Other Table'[Column]
)
),
CALCULATE( [Some Measure])
)
RETURN
Result
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |