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
sakamotothais
Helper III
Helper III

Ratio of the dynamic filter

Good morning people Can someone please help me?

I have a date slicer filter and another day of the week filter.

In the chart when filtering the day of the week, it shows the two days refers to the week

(For example Friday, presents days 21 last week and day 14 of the week behind)

 

I would like a formula that I can measure the proportion between them.

Example The date value of day 21 divided by date value of day 14.

 

And leave dynamic whenever I want to filter other days of the week.

 

The account would be: DIVIDE (Day 14 - Day 21) / Day 14

 

And it may at some point be divided between three dates, if I look Friday and get from the date of the current week day 28.

 

It's possible?

 

thanks

1 REPLY 1
Eric_Zhang
Employee
Employee


@sakamotothais wrote:

Good morning people Can someone please help me?

I have a date slicer filter and another day of the week filter.

In the chart when filtering the day of the week, it shows the two days refers to the week

(For example Friday, presents days 21 last week and day 14 of the week behind)

 

I would like a formula that I can measure the proportion between them.

Example The date value of day 21 divided by date value of day 14.

 

And leave dynamic whenever I want to filter other days of the week.

 

The account would be: DIVIDE (Day 14 - Day 21) / Day 14

 

And it may at some point be divided between three dates, if I look Friday and get from the date of the current week day 28.

 

It's possible?

 

thanks


@sakamotothais

What is the formula for three dates? (Day14- Day28)/Day 14? So the the equivalence could be (Earlist date - Latest date)/Earlist date, right? Then try

 

earlist value = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[Date]= MIN('Table'[Date])))

latest value = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[Date]= MAX('Table'[Date])))

your Fomula = DIVIDE([earlist value]-[latest value],[earlist value])

Capture.PNG

 

See more details in the attached pbix file.

 

 

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.