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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

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

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.