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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
joyeldavis007
Frequent Visitor

Measure values as rows in a table

Hi Guys,

i have a sample data as below and slicers for Emp Code and Date.

joyeldavis007_0-1701091967794.png


firstly i need to bucket the attendance of each employees .ie ,"below 2 " or "above 2" which is dynamic with the slicers.for this i have used the below measure which works fine.

Bucket =
var CountPerDate = CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'[Date]))
var b = IF(CountPerDate > 2, "Above 2","Below 2")
RETURN b

Now i need to create another table based on this bucket as below.
joyeldavis007_1-1701092755782.png


Both the bucket and % must be dynamic as it needed to change according to the slicers (Date&Emp code).
Can you guys please help me find a solution for the bucket & % table?

Calculation of % is number of employee in each bucket by the total employee.(eg :above-2 has 3 employees and below-2 has 2 employees then total employees will be 5 ,so bucket % for above-2 will be 3/5*100 = 60% and for below-2 it will be 2/5*100 = 40%. currently we dont need to include date info for any calculation.)


1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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