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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
brettg
Helper II
Helper II

Grouping test count

Hello,

 

I currently have a table populated with values, 1,2,3.. etc.

 

brettg_0-1646924995092.png

 

I am counting repeat test users with the following;

 

Count = 
CALCULATE(COUNTROWS('Table'),FILTER(ALLSELECTED('Table'),[UserID]=MAX('Table'[UserID]) &&  [TestDateTime]>=MIN('Table'[TestDateTime]) && [TestDateTime]<=MAX('Table'[TestDateTime])))

 

I am then grouping them into number of tests with;

 

Count(again based on meassure) = 
var _t=SUMMARIZE('Table','Table'[UserID],"Count by UserID",[Count])
return COUNTROWS(FILTER(_t,[Count by UserID]=MAX('New Table'[Test])))+0

 

Can anyone think of a way to do this where I can group into 1 test, 2 tests, 3-5 tests etc.. ?

 

Many thanks

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

Hi, @brettg;

Try to enter a table.

vyalanwumsft_0-1647328887111.png

Create a column 

Test2 = [start]&"-"&[end]

then create a measure.

Count(again based on meassure2) = 
var _t=SUMMARIZE('Table','Table'[UserID],"Count by UserID",[Count])
return COUNTROWS(FILTER(_t,[Count by UserID]<=MAX('Table (2)'[end])&&[Count by UserID]>=MAX('Table (2)'[start])))+0

 The final output is shown below:

vyalanwumsft_1-1647328949588.png


Best Regards,
Community Support Team _ Yalan Wu
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

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @brettg;

Try to enter a table.

vyalanwumsft_0-1647328887111.png

Create a column 

Test2 = [start]&"-"&[end]

then create a measure.

Count(again based on meassure2) = 
var _t=SUMMARIZE('Table','Table'[UserID],"Count by UserID",[Count])
return COUNTROWS(FILTER(_t,[Count by UserID]<=MAX('Table (2)'[end])&&[Count by UserID]>=MAX('Table (2)'[start])))+0

 The final output is shown below:

vyalanwumsft_1-1647328949588.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yalanwu-msft 

 

This is perfect - thank you! 🙂

brettg
Helper II
Helper II

Hi @v-yalanwu-msft 

 

Thank you for taking a look! I have attached a link to access my sample file. 

 

https://drive.google.com/drive/folders/1paF2gfnMvLDQJ5r-re0y0zMmuqLQlKvL?usp=sharing

 

Basically, instead of my value table being 1,2,3,4,5.. etc. I would like to group the number of tests; 1 test, 2-5 tests 6-10 tests etc

 

Many thanks,

 

Brett

v-yalanwu-msft
Community Support
Community Support

Hi, @brettg ;

Could you please consdier sharing more details about it and posting expected result so it is clear on what needs to be implemented? And It would be great if there is a sample file without any sesentive information here.
It makes it easier to give you a solution.

 

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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