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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Data Table Collection

Hello,

 

I have 2x tables one table which collects live results the other table we would like too reference results per. week / year.  In an attempt to accomplish this task I have create a DAX script which dosn't work as expected.

 

Listed below are 2x tables CROutages & CROresults i.e. CROresults Table is really what we are attempting to accomplish, but becaue of my lack of scripting skills the DAX script below provides total SUM of what is being collected not weekly.

 

Any help would be greatly appreciated,

 

Don

 

DAX Script below does not work only show total outage duration not weekly results.

 

Results = 
CALCULATE(SUM(CROutages[Outage Duration]),

FILTER(ALL(CROutages[Week],CROutages[Year]) ,
        'CROresults'[Week] <= 'Key Measures'[Reporting Week] &&
        'CROutages'[Year] = YEAR(TODAY())) 


)

 

 

Table(CROutages)

WeekOutage Duration
31982
4213
516623
6532
7120

 

Table(CROresults) below is the results we are looking for

YearWeekResults
202010
202020
202031982
20204213
2020516623
20206532
20207120
202080
202090
1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can refer the DAX below:

Column = IF(CROresults[Year]=YEAR(TODAY()),LOOKUPVALUE(CROutages[Outage Duration],CROutages[Week],CROresults[Week]))

test_lookupvalue.PNG

 

Best Regards,
Liang
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

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can refer the DAX below:

Column = IF(CROresults[Year]=YEAR(TODAY()),LOOKUPVALUE(CROutages[Outage Duration],CROutages[Week],CROresults[Week]))

test_lookupvalue.PNG

 

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

Anonymous
Not applicable

Not sure what is the problem but I'm guessing that you need a date dimension. Look it up on the web.

Once created, it will be far easier to run these time intelligence reports.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.