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.
Good afternoon! I have a Sales table loaded to Power BI. It contains historical data about sales.
Following this guide (video_tutorial ).
I want to do the same as demonstrated in video. I want to separate positive and negative sales through DAX formula. So I right-click my mouse on the "Sales" table and select option "Create new meausure". After that I type the code for this measure like that (in line with recommendations from video tutorial):
Negative sales =
VAR SalesAmt = 'Sales table name '[Sales column name]
VAR Result = IF(SalesAmt < 0, SalesAmt, 0)
RETURN SalesAmt
However, I am getting the error "can not determine single value Sales..." What I am doing wrong and why everything is ok in the video?
Solved! Go to Solution.
In the video he is using a measure, not a column reference. You could define a measure like
Sales Amount = SUM('Sales table name '[Sales column name])
and then use that in the code instead of the column reference
In the video he is using a measure, not a column reference. You could define a measure like
Sales Amount = SUM('Sales table name '[Sales column name])
and then use that in the code instead of the column reference
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 |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |