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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors