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
Hann_Sen
Regular Visitor

CALCULATE (MAX (FILTER only works on dataset with the most row... Help

Hello Mentors,

 

HRImax = CALCULATE(MAX('HRI'[VF_V]),FILTER(ALL('HRI'),'HRI'[Probe]=MAX('HRI'[Probe])))
 
The above Dax script only works for data sets with the most row. How can I improve it?
If you filter [DataLink_HRI] = HRI_2485 -> it works ... 39 rows
If you filter [DataLink_HRI] = HRI_2878 -> doesn't work ... 16 rows
  
ProbeDataLink_HRIIf_AVF_VHRImax
1HRI_24850.0022.540162.94645
1HRI_24850.0052.574422.94645
1HRI_24850.012.60012.94645
1HRI_24850.022.626422.94645
1HRI_24850.032.642422.94645
1HRI_24850.052.663932.94645
1HRI_24850.082.685872.94645
1HRI_24850.12.69752.94645
1HRI_24850.22.740542.94645
1HRI_24850.352.789762.94645
1HRI_24850.52.830922.94645
1HRI_24850.72.880052.94645
1HRI_248512.946452.94645
2HRI_24850.0022.53992.9477
2HRI_24850.0052.57462.9477
2HRI_24850.012.600162.9477
2HRI_24850.022.626162.9477
2HRI_24850.032.642362.9477
2HRI_24850.052.663842.9477
2HRI_24850.082.685792.9477
2HRI_24850.12.697582.9477
2HRI_24850.22.741032.9477
2HRI_24850.352.789992.9477
2HRI_24850.52.831232.9477
2HRI_24850.72.88062.9477
2HRI_248512.94772.9477
3HRI_24850.0022.539612.94726
3HRI_24850.0052.574012.94726
3HRI_24850.012.599992.94726
3HRI_24850.022.626042.94726
3HRI_24850.032.642192.94726
3HRI_24850.052.663762.94726
3HRI_24850.082.685962.94726
3HRI_24850.12.697322.94726
3HRI_24850.22.740742.94726
3HRI_24850.352.790022.94726
3HRI_24850.52.830892.94726
3HRI_24850.72.880512.94726
3HRI_248512.947262.94726
1HRI_28780.0021.61412.94645
1HRI_28780.0051.644882.94645
1HRI_28780.011.669172.94645
1HRI_28780.021.69612.94645
1HRI_28780.031.714332.94645
1HRI_28780.051.740572.94645
1HRI_28780.081.7712.94645
1HRI_28780.11.788482.94645
2HRI_28780.0021.613762.9477
2HRI_28780.0051.644652.9477
2HRI_28780.011.668882.9477
2HRI_28780.021.696042.9477
2HRI_28780.031.71412.9477
2HRI_28780.051.740592.9477
2HRI_28780.081.770772.9477
2HRI_28780.11.788312.9477

 

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @Hann_Sen ,

 

We can create a measure.

 

HRImax = CALCULATE(MAX('HRI'[VF_V]),FILTER(ALLEXCEPT('HRI','HRI'[Probe],'HRI'[DataLink_HRI]),'HRI'[VF_V]))

 

vtangjiemsft_0-1687918365501.png

If this does not match your expected results, please provide the output of the sample data you are expecting. Thank you.

 

Best Regards,

Neeko Tang

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

1 REPLY 1
v-tangjie-msft
Community Support
Community Support

Hi @Hann_Sen ,

 

We can create a measure.

 

HRImax = CALCULATE(MAX('HRI'[VF_V]),FILTER(ALLEXCEPT('HRI','HRI'[Probe],'HRI'[DataLink_HRI]),'HRI'[VF_V]))

 

vtangjiemsft_0-1687918365501.png

If this does not match your expected results, please provide the output of the sample data you are expecting. Thank you.

 

Best Regards,

Neeko Tang

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.