Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |