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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
newbieNG
Regular Visitor

Migration of Tableau Dashboard to PowerBI , issue with a measure

Hello Community , I am migrating a tableau dashboard to PowerBi dashboard. I am stuck with few of the measures of Tableau that I am finding tricky to write in DAX. 

One of the measure is :

{ FIXED DATEPART('weekday', [Start Time]), DATEPART('hour', [Start Time]): AVG(
{ FIXED DATETRUNC('day', [Start Time]), DATEPART('weekday', [Start Time]), DATEPART('hour', [Start Time]):
COUNTD([Warehouse Name])}
)}

I came up with this DAX expression 

Avg Warehouses on During this hour =
AVERAGEX (
SUMMARIZE ( WAREHOUSE_METERING_HISTORY, WAREHOUSE_METERING_HISTORY[START_TIME].[Day] ),
CALCULATE (AVERAGE( WAREHOUSE_METERING_HISTORY[Time] ) )
)
But this is not giving me the desired result . I am supposed to calculate a Total number of hours of warehouse at certain day at certain hour. 
I am attaching the graph of tableau that I am working to recreate in PowerBI
newbieNG_1-1651172593445.png

If anyone has done this or can help me understand & write this expression will be helpful.

Thank you

 

 

3 REPLIES 3
newbieNG
Regular Visitor

Thank you, Chenwu zhu for replying! By "field name " you mean column or what. I didn't get it , can you please elaborate that can help me to understand a little better. 

Thanks

Hi @newbieNG ,

 

The name given to a total or summarize column, enclosed in double quotes.

Please refer this link.

SUMMARIZE function (DAX) - DAX | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-chenwuz-msft
Community Support
Community Support

Hi @newbieNG ,

 

Avg Warehouses on During this hour =
AVERAGEX (
SUMMARIZE ( WAREHOUSE_METERING_HISTORY, WAREHOUSE_METERING_HISTORY[START_TIME].[Day] ),"field_name",
AVERAGE( WAREHOUSE_METERING_HISTORY[Time] ) 
)
 
You had missed one argument which i high light in red.
 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.