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
rockykb
Helper I
Helper I

Compare the missing values between two dates in a single table

Hi,

My request is below;

 

Capture.PNG

From this table I want compare the values missing beween two dates. I want to populate the numbers as well as the values. Date I want to have a slider so based on min and max date from the slider, the data should populate.

Example 1: Let's say my min date in slider is 1/1/2019 and max date is 1/3/2019. For this the missing value is 5.

Example 2: Let's say my min date in slider is 1/2/2019 and max date is 1/3/2019. For this the missing value is 3.

 

Please suggest.

 

Thanks in Advance!

7 REPLIES 7
Jihwan_Kim
Super User
Super User

Hi,

Please check the below measure and picture, and please let me know whether it is what you needed.

I also added a link to the pbix file below.

 

Missing Values Count =
VAR daysinperiod =
COUNTROWS ( dates )
VAR newtable =
GROUPBY (
Data,
Data[Value],
"@valuegroup", COUNTX ( CURRENTGROUP (), Data[date] )
)
VAR filternewtalbe =
FILTER ( newtable, [@valuegroup] < daysinperiod )
RETURN
COUNTROWS ( filternewtalbe )

 

Picture1.png

 

https://drive.google.com/file/d/18fmECiBWs5VWrDveCiB6wsHLOiR_pF0t/view?usp=sharing 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Hi @Jihwan_Kim , 

Thank you for the refrence. But how to populate the values?

Hi,

Sorry, I forgot to describe the values in the report.

 

please kindly check the below calculated-measure, and the picture.

 

Missing Values Show =
VAR daysinperiod =
COUNTROWS ( dates )
VAR newtable =
GROUPBY (
Data,
Data[Value],
"@valuegroup", COUNTX ( CURRENTGROUP (), Data[date] )
)
VAR filternewtalbe =
FILTER ( newtable, [@valuegroup] < daysinperiod )
RETURN
CONCATENATEX( filternewtalbe, Data[Value], ", ")

 

Picture1.png

 

The file link is still the same.

 

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up 

 

 

Thank you.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Hi @Jihwan_Kim , 

Can we show the values in Tables format and show other details, if available any.

Hi, @rockykb 

Thank you for your question, and yes you can show based on what you want to show.

Because the source data was not showing much information, I could come up with something like the below.

For instance, you can show "Not Missed" vs "Missing Value".

Or, you can only show "Missing Value".

It is also possible to show it with other information if there are any.

Picture1.png

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up 

 

https://drive.google.com/file/d/18fmECiBWs5VWrDveCiB6wsHLOiR_pF0t/view?usp=sharing 

 

The link is still the same, and I updated it.

thank you very much.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


HI @Jihwan_Kim ,

Data isn't accurate. If you change the slicer to Last Min & Last Max date, the values are incorrect.

Also if the dates aren't continuous then it will populate wrong data.

Hi, @rockykb 

Thank you for your feedback.

 

I think I misunderstood your initial question.

My visualizations are giving the answer when selecting the dates between those are in your initial question.

And, if it selects all ranges, it gives all Vause = Missing Value. Because non of them appears on all days. -> I think this is the point that I misunderstood.

 

Sorry to misunderstand, but if it is OK with you, please share your desirable outcome.

 

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.