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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Vkt
New Member

undefined

Thanks in advance.

I have two fields expected date and requested date in a fact table.

I have created a measure like this:

If (expected date<> blank && expected date < requested date, quantity, blank)

Quantity is measure which already created

Unfortunately its not working as measure in my power bi.

It's giving an error : a table of multiple value was supplied

 

Any alternative to create this above condition as measure.

 

Regards,

3 REPLIES 3
Vkt
New Member

@TomMartens Thanks for your response.

If (expected date<> blank && expected date < requested date, quantity, blank)

 

The above expression is a dax measure but in my scenario I can't use aggregation.

 

Hey @Vkt ,

 

what you posted is not a measure, at best it's pseudo code.
If you can't use an aggregation function, then you have to use a table iterator function like MAXX, or SUMX. Table iterator functions create a row context, this allows to reference a column w/o using an aggregation function.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
TomMartens
Super User
Super User

Hey @Vkt ,

 

share the exact DAX code of your measure.
Whenever you are creating a measure you have to wrap a column reference inside an aggregation function like MAX('<your table name>'[the column name]). It also can become possible to wrap the aggregation function inside a CALCULATE( ... ) to modify the current filter context.

If you are new to measures, start here: https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tutorial-create-measures?WT.mc_id...

Hopefully, this provides some additional insights to tackle your challenge.

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.