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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Experts
i Have dataset with direct query mode in Postgresql, Need Help to create flag column "GOP FLAG" like below image,
if any approval_NO have GOP Activity then "GOP FLAG" Column must create GOP on All Approval_No Group, and Blank if they dont have GOP activity.
how can i do this with DAX?
Thank you
Solved! Go to Solution.
Hi @Anonymous ,
By your description , You mentioned that “Need Help to create flag column "GOP FLAG" ”, because
'CALCULATE' is not allowed as part of calculated column DAX expressions on DirectQuery models, so it's
suggested to create measure instead.
GOP Flag =
VAR _A =
CALCULATE (
MAX ( [Approval_NO] ),
FILTER ( ALLEXCEPT ( Table1, Table1[Approval_NO] ), [activity] = "GOP" ))
RETURN
IF ( _A <> BLANK (), "GOP", " " )
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
By your description , You mentioned that “Need Help to create flag column "GOP FLAG" ”, because
'CALCULATE' is not allowed as part of calculated column DAX expressions on DirectQuery models, so it's
suggested to create measure instead.
GOP Flag =
VAR _A =
CALCULATE (
MAX ( [Approval_NO] ),
FILTER ( ALLEXCEPT ( Table1, Table1[Approval_NO] ), [activity] = "GOP" ))
RETURN
IF ( _A <> BLANK (), "GOP", " " )
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Wowww, It Works good in my Report.
Thank you very much for helping me solved the problem.
Hi, @Anonymous
The below is for creating a new column.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Hello @Jihwan_Kim
Thanks for your Respons,
With your Formula i facing error like below
maybe because I used direct query mode, Can you please help me to solve this problem?
Thanks
Hi, @Anonymous
Thank you for your feedback.
Oh, sorry that I missed your explanation about direct query mode.
Is it not possible to change it to import mode? I am not sure how to add the actual column in direct query mode.
Dear @Jihwan_Kim
We need the report real time, so probably it cannot switched to import mode,
i wish i could, hiks
but anw thanks for your help btw.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 63 | |
| 50 | |
| 45 |