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
Andrew_na_lang
Helper IV
Helper IV

The difference in the number of days does not show up if the order count is 2 or more,

Hi Guys,

I created a calculated measure to get the difference in the number of days between the registration date and the first order date as shown below. For some reason, if the count of order is 2 or more, the count does not appear on the table visualisation. 

 

Help please!

power 4.png

3 REPLIES 3
Andrew_na_lang
Helper IV
Helper IV

Thanks for the speedy response @amitchandak.

It didn't work. First order in the table visualisation is a calculated measure.

Hi @Andrew_na_lang ,

 

The reason why is blank is that, the result of selectedvalue(id) have two or more rows in its context, so the result of selectedvalue is blank, so as your measure Days Diff.

 

You can check that by test expression in your measure one by one. Or you can try replace the SELECTEDVALUE() to MAX().

 

If it does not work, please share some sample data and expect result.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Andrew_na_lang , Try like

 

Datediff( max(Table[registration date]), minx(allexcept(Table[Customer Name]), Table[Order Date]) , day)

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.