Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
98 | |
89 | |
82 | |
70 | |
67 |
User | Count |
---|---|
115 | |
104 | |
101 | |
72 | |
64 |