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
Oomsen
Helper III
Helper III

Count if DATEDIFF > 12

Hello.

 

I want to count how many items in our inventory aren't used for more then 12 months. 

I created a LASTDATE and a DATEDIFF measure to see which items need to be count.

The result is:

Item no    LASTDATE        DATEDIFF

10.009      10-07-2017      21

10.011       1-11-2017       17

10.035       1-11-2017       17

 

The result of the new measure i'm looking for should be 3.

 

6 REPLIES 6
Zubair_Muhammad
Community Champion
Community Champion

@Oomsen 

 

Try this MEASURE

 

Measure=
COUNTROWS ( FILTER ( VALUES ( tableName[Itemno] ), [DATEDIFF] > 12 ) )

Regards
Zubair

Please try my custom visuals

It looks like your measure is working. But, when i place the measure in a KPI-visual it doens't show the total quantity. Any idea?

Hi @Oomsen 

 

Do you mean it works in Card visual but not in KPI visual?


Regards
Zubair

Please try my custom visuals

YesCard.PNGkpi.PNG

@Oomsen 

 

try this revision

 

Measure =
COUNTROWS ( FILTER ( ALLSELECTED ( tableName[Itemno] ), [DATEDIFF] > 12 ) )

Regards
Zubair

Please try my custom visuals

Still same result. 

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.