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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ChoiJunghoon
Helper III
Helper III

How to get the measure value by using DAX

Hello. SuperMan.
Would you like to help me to get measure value? 

Data connection : Direct Query

 

I want to know location Status.

Table_Location

LocationID
A1
A2
A3
B1
B2
B3
C1
C2
C3

 

Table_LogHistory

TestIDStatusLocationIDSequence
M1OngoingA11
M1PausedA22
M1DoneC33
M2DoneB11
M2DoneB22
M2DoneB33
M3OngoingC11
M3OngoingC22
M4DoneA11
M4DoneB12
M4OngoingC13
M4OngoingC24

 

 

Measure 

Step 1. Var table. 

Ongoing&Paused 

LocationIDTestIDTestID Count
A1M11
A2M11
A3  
B1  
B2  
B3  
C1M3,C12
C2M31
C3  

 

Step2. Done 

TestIDStatusMaxSequece
M1Ongoing,Paused3
M2Done3
M3Ongoing2
M4Done,Ongoing4

 

Step3. Done 

TestIDStatusMaxSequeceLocationID
M2Done3B3

 

Step. 

Ongoing + Paused + Done

Measure : Test ID Value

Measrue : Test ID Count 

 

LocationTestIDTestID Count
A1M11
A2M11
A3  
B1  
B2  
B3M21
C1M3,C12
C2M31
C3  

 

Could you help to create the Measure ?? 

2 REPLIES 2
Anonymous
Not applicable

Hi @ChoiJunghoon ,

 

I'm confused about your requirements.

Is the screenshot below the desired result you want? Why is there C1 in C1? In Step2, the title is Done, but there are Ongoing and Paused in the Status column.

vstephenmsft_0-1639554996559.png

 

 

Best Regards,

Stephen Tao

 

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

 

VahidDM
Super User
Super User

Hi @ChoiJunghoon 

 

Can you post sample data as text and expected output?
Not enough information to go on;

please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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