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

Exclude rows which didnt appear yesterday

Hello, everyone,


I need help with one issue. I have a data model where I calculate events that were 50% more than the previous day and I want to count them (Count).

 

Measure = 

VAR Today = 
    CALCULATE(SUM(Table[Minutes]),Table[Date]=MAXX(Table,Table[Date]))
	
VAR Yesterday = 
    CALCULATE(SUM(Table[minutesX1.2]),Table[Date]=MAXX(Table,Table[Date])-1)
	
RETURN
    SWITCH(TRUE(),
        (Today>Yesterday),1,
0)

 

 

As in the following screenshot, I would like the formula to count my values in row A, E because they have 50% more value than the previous day.

 

Currently, my measure is set so that it counts the values in columns A, B, D, E, because these values in the previous day had the value BLANK and therefore are automatically 50% larger.

 

Do you know any solution how to exclude this so that the values show correctly Count = 2?

 

Table

Misq_0-1646924553931.png

 

 

Matrix

Misq_1-1646922103484.png

Thanks in advance!

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @Misq ,

I don't find column [Minutes] and column [Minutes*1.2] in the expression in the picture, please consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.

 

It makes it easier to give you a solution.

  1. Sample (dummy dataset) data as text, use the table tool in the editing bar.
  2. Expected output from sample data.
  3. Explanation in words of how to get from 1. to 2.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

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.