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

can not get the count ids for previous days

Hello! 

 

I'm stucked with a getting a proper measure for the following case.


In my initial raw data (raw data example) I have (in a simplified way) a list of 3 columns: date, login, %_of_discount.

Business sense behind is a list of the logins of my customers, who is eligible every day for the specific % of discount. 

It's changing everyday, as per some business rules.

 

 

So my objective is to get the measure, that would show me for the each respective day the number of the logins, that satisfy some criteria, but two 2 days before (for example, had % of discount > 5% two days before).

 

So, expected result is (Example, not linked to real data):

24 July:  2234 (which is the count (ids) with %_discount > 5% on 22th July

25 July:  2134 (which is the count (ids) with %_discount > 5% on 23th July

..

and etc.

 

What I've tried but failed:

[code]

# Of ids = calculate(countx([Login]), dateadd([Date],-2,day))
# Of ids = calculate(([# of customers]), [Date]=dateadd([Date],-2,day))

[/code]

 

PS [# of customers] is the existing properly working measure, showing total number of count (ids) each day. But, it doesn't help to solve my issue. 

 

Obvioulsy I'm missing something very obvious here, but can't find what... 

Can you please advise? 

 

 

 

 

 

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @mamaraci 

I did not find any errors in your formula, they seem to work perfectly on my side,

You may need  the step of applying the field "%discount" to the filter  pane.

For example:

98.png

(the count (ids) with %_discount >= 9% )

 

Please check my sample file for more details.

If I misunderstand,please feel free to let me know.

 

Best Regards,
Community Support Team _ Eason

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.