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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
tproost
Regular Visitor

count numbers in calculated row

Hi,

 

I have a table of Presence of certain employees at certain events.

for each event it will list the eventnumber and employee name in a row.

 

Richt now in the report i just count the occurences and it tells me for each employee how many events they attende within a filtered period of time.

EventEmployee
1a
1b
2a
2b
3b

 

The problem occurs when i try to list how may employees have attended how many events.

e.g.

 

# of events# of employees
31

2

1

1

0

We need this data because they are required to attend certain amount of events in a given period. this will help us track how many have not completed it.

 

Optimaly i find a sollution that still allows me to filter based on Time periods.

 

I have been looking at measures but I can't manage to get the correct output.

 

Thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@tproost, I think you Dynamic segmentation, refer example

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

The numbers shown in the result table seems wrong.  the number of people who attended 3 events should be 0.  Please show the expected result very clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yangliu-msft
Community Support
Community Support

Hi  @tproost ,

I created some data:

vyangliumsft_0-1675821306500.png

 

Here are the steps you can follow:

Way1
Set [Employee] to Count (Distinct)

vyangliumsft_1-1675821306501.png

Ways2:

Create measure.

Measure =
var _mindate=MINX(ALLSELECTED('Table'),[Date])
var _maxdate=MAXX(ALLSELECTED('Table'),[Date])
return
CALCULATE(
    DISTINCTCOUNT('Table'[Employee]),
FILTER(ALL('Table'),'Table'[Event]=MAX('Table'[Event])))

Result:

vyangliumsft_2-1675821306502.png

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@tproost, I think you Dynamic segmentation, refer example

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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