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.
=if (SALES_CODE='W',PART_NBR, 'ACCS')
How would this QlikView calculation be in Power BI? I have tried but it did not seem right.
HI @Anonymous,
Where did this data field host? In the current table or related tables? Can you please share some dummy data to help us clarify your scenario and test to coding formula?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
@Anonymous
Are you creating a column or a measure? Please provide some sample data.
Proud to be a Super User!
Is this a measure or a calcluated column? If the latter (which I recommend against) it is:
=if ([SALES_CODE]='W',[PART_NBR], [ACCS])
If the former, we will need more context as to what is happening. Some sample data would be good.
If you want a column of this and need to do it in Power Query, which I highly recommend, then:
=if [SALES_CODE]='W' then [PART_NBR] else [ACCS]
In general, try to avoid calculated columns. There are times to use them, but it is rare. Getting data out of the source system, creating columns in Power Query, or DAX Measures are usually preferred to calculated columns. See these references:
Calculated Columns vs Measures in DAX
Calculated Columns and Measures in DAX
Storage differences between calculated columns and calculated tables
Creating a Dynamic Date Table in Power Query
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThank you for the update.
So in QlikView this is a caculated dimension, so I was trrying to replicate this in Power BI.
Thank you, and I will try the latter calculation!
Thanks,
Chin_IT
Glad to help @Anonymous
Please mark one of these posts as the solutoin if it worked for you so the thread can be marked solved and others can find it, or post back with further questions if you need more help making it work.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCovering 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 |
---|---|
113 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |