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.
Hi,
My got my data from PowerBI online service, which means I cannot edit the queries or build new tables and the only thing I can do is creating some measures. I'm trying to pick out 9 specific items and divide the case numbers by their pack sizes. Other items remain the same. The key to identify item is called "MIN", which is the item number. So what I did was first creating a measure since otherwise I won't be able to refer the fields that are alredy in the model:
MIN value = VALUES(ItemInfo[MIN])
Converting everything to value.
Here is the list of items that I need to make adjustments.
My idea is to use if statement like this:
IF(AND(ItemInfo[MIN] = "xxxxxxxx", ItemInfo[MIN] = "xxxxxxx".......), [cases]/pack size, [cases]). But seems it's not working.
Here is my function for the first item:
Revised 2018 Cases = IF(ItemInfo[MIN value] = "INACTIVE03208",[Cases 2018]/24,[Cases 2018])
[Cases 2018] is a measure under table TransData.
And the error is:
I would appreciate if anyone can help me address this issue
@Anonymous,
I am unable to access the PBIX file you share to me. Please share me the PBIX file that you publish to Power BI Service.
Regards,
Lydia
@Anonymous,
I note that you create a measure after connecting to the Power BI Service dataset in Desktop.
MIN value = VALUES(ItemInfo[MIN])
You should get the following similar error when dragging the MIN value measure in a visual. VALUES() funtion returns a one-column table that contains the distinct values from the specified table or column. You are able to create a new table using VALUES() function in DAX formula.
Could you please share dummy data of your table and post expected result here?
Regards,
Lydia
Thanks Linda! Is there a way I can share the file with you and have you take a look? Maybe through email? Thank you!
@Anonymous,
I sent you Private Message.
Regards,
Lydia
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |