Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Look for a value

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.

123.png

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:

2.png

I would appreciate if anyone can help me address this issue

 

4 REPLIES 4
v-yuezhe-msft
Employee
Employee

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yuezhe-msft
Employee
Employee

@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.
1.JPG

Could you please share dummy data of your table and post expected result here?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.