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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.