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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
F800
Frequent Visitor

Use Measure result as column header

Hi, I'm trying to build an access control matrix that provides IN and OUT times for each worker. I got it working by picking the Earliest badge scan into the building and the latest badge scan out of the building. The readers have direction indication so not a big deal.

 

My issue now is with the night shift, as the badge scan IN will happen anytime in the afternoon and the badge scan OUT next morning. The result I have right now is that the OUT time for each day is actually the shift end for the day before.

 

I've created a Measure that compares IF Earliest IN > Latest OUT then the otput will be Latest OUT - 1 Day

OUT_TimeC = IF(MIN(GT[IN Time])>MAX(GT[OUT Time]),MAX(GT[OUT Time])-1,MAX(GT[OUT Time]))

 

 

The data for a single user looks like this:

F800_0-1739732613552.png 

F800_0-1739732739782.png

 

 

 

 

 

The result is correct, but still placed under the same original date in a Matrix visual. Which makes sense as the row is still tied to the calendar date regardless of the result of the Measure.

 

What I need is use the Measure result date as the column header of the matrix. Not sure if I'm actually thinking on the right solution but here is where I'm stuck with my basic knowledge in PowerBI and Power Query. I'm just learning DAX and have not done Calculated columns or such so far.

 

Thanks in advance.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You cannot place measures in column headers. What you can do is use a disconnected reference table that feeds your column headers, and a new measure that calculates your ol measures depending on the reference value.

 

This also means that you need to know all possible measure names in advance.

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

You cannot place measures in column headers. What you can do is use a disconnected reference table that feeds your column headers, and a new measure that calculates your ol measures depending on the reference value.

 

This also means that you need to know all possible measure names in advance.

Hi @F800 ,

If our response addressed by the community member for your query, please mark it as Accept Answer and click Yes if you found it helpful.

Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

Hi @F800 ,

 

If a community member’s response addressed your query, please mark it as "Accept Answer" and click "Yes" if you found it helpful.

If you have any further questions, feel free to ask.

Thank you for being a valued member of the Microsoft Fabric Community Forum!

Hi @F800 ,

If our response addressed by the community member for your query, please mark it as Accept Answer and click Yes if you found it helpful.

Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors