Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I have a table where the second last column (Total number of products launched) is a custom column, and the last column (number of products launched for the selected years) is a calculated measure using DAX language and it is the one that can adapt to the selected years filter.
My goal is to add add a flag as a column/ calculated DAX measure with a condition, if the last 2 columns in the table are the same - the returning value is True otherwise, False. However, using a true or false column is displaying the same information: True.
Please help! Thank you.
Solved! Go to Solution.
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create calculated column.
Total number of products launched_Column =
SUMX(FILTER(ALL('Table'),'Table'[Group]="launched"),[product number])
2. Create measure.
number of products launched for the selected years =
var _select=SELECTEDVALUE('Table'[Year])
return
SUMX(FILTER(ALL('Table'),'Table'[Group]="launched"&&'Table'[Year]<=_select),[product number])
Flag =
IF(
MAX('Table'[Total number of products launched_Column])=[number of products launched for the selected years],"True","False")
Flag1 =
IF(
ISERROR(
SEARCH("True",[Flag]))
,
"true",
[Flag]
)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create calculated column.
Total number of products launched_Column =
SUMX(FILTER(ALL('Table'),'Table'[Group]="launched"),[product number])
2. Create measure.
number of products launched for the selected years =
var _select=SELECTEDVALUE('Table'[Year])
return
SUMX(FILTER(ALL('Table'),'Table'[Group]="launched"&&'Table'[Year]<=_select),[product number])
Flag =
IF(
MAX('Table'[Total number of products launched_Column])=[number of products launched for the selected years],"True","False")
Flag1 =
IF(
ISERROR(
SEARCH("True",[Flag]))
,
"true",
[Flag]
)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous
Could you please supply your PBIX file or some sample data and examples of your table visual. Really hard to get my head around this without seeing your data, your measure etc.
regards
Phil
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
123 | |
78 | |
48 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |