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
nyno90
Frequent Visitor

Missing 1 day in calculation results

Hello,

 

I prepared DAX calculation which generate number of unique alerts for from 01.02.23 to 28.02.23: 

Alerts Generated = CALCULATE(DISTINCTCOUNT('Alert Data'[Alert ID]), FILTER('Alert Data','Alert Data'[Creation Date]>= MAX(START_DATE[START_DATE]) &&'Alert Data'[Creation Date] <= MAX(END_DATE[END_DATE])))

 

I would like to have number of alerts for each day of February in 1 line chart. All looks good but when I put measure into line chart value I am missing 28.02 alerts.

START_DATE[START_DATE] is a parameter from powerquery: 01-02-2023

END_DATE[END_DATE]) is parameter 28-02-2023

'Alert Data'[Creation Date] and START_DATE[START_DATE] / END_DATE[END_DATE]) have the same date format. 

And ofc. I have data for 'Alert Data'[Creation Date] from 28.02.2023

I have no idea why I am missing it on chart.alerts.JPGCapture.JPG 

 

Thank you for your help.

4 REPLIES 4
andhiii079845
Super User
Super User

It is diffcult or not clear where the problem is. Perhaps you are able to share the PBI?

In general check if the visual has a filter directly or from a slicer? Change the graph to matrix and check if you can the data from the missing date. 
I only see one thing:
CALCULATE(DISTINCTCOUNT('Alert Data'[Alert ID]), FILTER('Alert Data','Alert Data'[Creation Date]>= MAX(START_DATE[START_DATE]) &&'Alert Data'[Creation Date] <= MAX(END_DATE[END_DATE])))

 

-> ALL()

CALCULATE(DISTINCTCOUNT('Alert Data'[Alert ID]), FILTER(ALL('Alert Data'),'Alert Data'[Creation Date]>= MAX(START_DATE[START_DATE]) &&'Alert Data'[Creation Date] <= MAX(END_DATE[END_DATE])))






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you for your reply,

 

Sorry, I can not share powerbi file because it contains sentisive data.

Unfortunately query with ALL() also does not work. The only thing which helps is removing part: <= (END_DATE[END_DATE])

So when I have query like: CALCULATE(DISTINCTCOUNT('Alert Data'[Alert ID]), FILTER('Alert Data','Alert Data'[Creation Date]>= MAX(START_DATE[START_DATE]) ))

then data for 28.02 is visible. 

But it is really weird why it happens... And I would like to find solution to make date limitation. 

 

andhiii079845
Super User
Super User

Do you have data from the 'Alert Data' for the 28.02 ? Can you check it please? 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Yes, I have 'Alert Data' data for 28.02

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.