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
Syndicate_Admin
Administrator
Administrator

Show values only for a single day

Good morning, in the attached table I am calculating the mean and deviation for the date range shown and per hour. My goal is to display those two values for each hour only for the last day of the range so that I don't see duplicate values for every day.

Alberto99_0-1664351081250.png

1 ACCEPTED SOLUTION

Hi @Syndicate_Admin ,

Please try below steps:

1. create some measures with below dax formula

Measure = MAXX('Table',[Date])
Hour1 =
VAR cur_date = [Measure]
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Date] <= cur_date )
RETURN
    AVERAGEX ( tmp, [H1] )

There are 8 measures that named "Hour 1-8", they are very likely.

 

2. add the measure to the table visual

vbinbinyumsft_0-1664439565935.png

Please refer the attached .pbix file.

 

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

View solution in original post

5 REPLIES 5
v-binbinyu-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

Please set the filter in the "Filter Pane" for the table visual according to your needs.

Animation21.gif

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

Hello, maybe I did not express myself well. My goal is to calculate the average spread for the date range shown in the table and per hour. Now, with the formula I have it shows me the same value for every day and if I do what you put me before, in the average I see the same value as the spread.

Attached photo of the formula and table.

Alberto99_0-1664433844539.png

Thanks a lot.

Hi @Syndicate_Admin ,

Please provide the desensitized example data, the calculate logic and a screenshot of your desired results.

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_ Binbin Yu

I have created in excel a reduced version of what I have in the report, I hope this helps you to understand the calculations. My goal is to find the table in yellow, that is, to show the average per hour for the date range.

Alberto99_0-1664436510112.png

Thanks a lot.

Hi @Syndicate_Admin ,

Please try below steps:

1. create some measures with below dax formula

Measure = MAXX('Table',[Date])
Hour1 =
VAR cur_date = [Measure]
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Date] <= cur_date )
RETURN
    AVERAGEX ( tmp, [H1] )

There are 8 measures that named "Hour 1-8", they are very likely.

 

2. add the measure to the table visual

vbinbinyumsft_0-1664439565935.png

Please refer the attached .pbix file.

 

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

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.