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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Lowest value in Profit% by Date Column excluding any holidays

I have Data like:

Date      Profit% City

21mar20 33.3  Paris

15mar20 100 New york

18mar20 67 Paris

18may21 67 New york

21may21 67 Berlin

22may21 33 Berlin

16may21 21 Paris

 

I want to get the Date in which Profit % was the lowest City wise and it should exlcude holidays.

So if there is Profit% for a day which is satuday or sunday it should get excluded.

So here for paris ,21 % will get ignored as 16may21 is Sunday.

 

So Results should look like

21mar20 33.3 Paris

18may21 67 New york

22may21 33 Berlin

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Your answers are wrong - please recheck.  You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi @Anonymous  , 

 

You could create a measure as follows:

lowProfit% =
CALCULATE (
    MIN ( [Profit%] ),
    FILTER (
        ALLEXCEPT ( 'Data', 'Data'[City] ),
        WEEKDAY ( [Date], 2 ) <= 5
            && WEEKDAY ( [Date], 2 ) >= 1))

 Then create a flag measure and apply it into filter:

flag =
IF (
    WEEKDAY ( MAX ( [Date] ), 2 ) >= 1
        && WEEKDAY ( MAX ( [Date] ), 2 ) <= 5,
    1)

v-yalanwu-msft_0-1621936152211.jpeg

The final output is shown below:

v-yalanwu-msft_1-1621936152212.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.  

Ashish_Mathur
Super User
Super User

Hi,

Your answers are wrong - please recheck.  You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.