Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a quantity column from one table,
a dimension column from other table which is grouped by 2 - Bus , other,
Need to create a new column if naming
if quantity > 2, business
if quantity <=2 && group = bus , business
other
Please help me with the solution.
Thanks
Solved! Go to Solution.
I'm not completely clear on what you are asking. See if this file does what you want.
I created a calculated column that I think has the logic you are looking for.
Category = VAR TotalQuantity = CALCULATE(SUM('Fact Table'[Quantity])) RETURN IF( TotalQuantity > 2, "Business", IF( TotalQuantity <= 2 && RELATED('Dimension Table'[Group]) = "Business", "Business", "Other" ) )
If that isn't what you need, please provide some sample data - both tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingI'm not completely clear on what you are asking. See if this file does what you want.
I created a calculated column that I think has the logic you are looking for.
Category = VAR TotalQuantity = CALCULATE(SUM('Fact Table'[Quantity])) RETURN IF( TotalQuantity > 2, "Business", IF( TotalQuantity <= 2 && RELATED('Dimension Table'[Group]) = "Business", "Business", "Other" ) )
If that isn't what you need, please provide some sample data - both tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi edhans,
I was trying the same thing before - due to small syntax problem.
It was not working.
Got where the mistake is from.
Thank you
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |