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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Output Status as Column

Hi All,

 

In the below table for the first week I worked 40 hours out of 40 so it is billable. Second week same as first week. So for 1st and 2nd week i am Billable.

But for third week i worked only 30 hours out of 40 so i am PB(Partially Billable).

Now in the total rows i want to show CStatus as PB because 110 hours out of 120. In another words when my name is selected without selecting any date it need to show count as 1 for Partially Billable.

 

Thanks in advance.

 

Screenshot_1.png

2 ACCEPTED SOLUTIONS

hi, @Anonymous 

You may try this way:

Step1:

Create a Cstatus Dim table(Do not create a relationship with basic table).

Step2:

Then use this formula add a new measure

Measure 2 = IF(SELECTEDVALUE(Dim[Cstatus])=[Measure],COUNTA('Table'[Name]))

Step3:

Drag Cstatus field from Dim table and measure 2 into a pie chart.

Result:

1.JPG

 

2.JPG

here is new sample pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
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

hi, @Anonymous 

If so, try these two measure:

Measure = 
CALCULATE(IF (
    DIVIDE (
        CALCULATE ( SUM ( 'Table'[Billing Hours] ) ),
        CALCULATE ( SUM ( 'Table'[HoursForWeek] ) )
    ) < 1,
    "PB",
    "Billable"
),FILTER(ALLSELECTED('Table'),'Table'[Name]=SELECTEDVALUE('Table'[Name])))
Measure 2 = VAR _table=SUMMARIZE('Table','Table'[Name],"_discount",[Measure]) 
var _table2=FILTER(GENERATE(_table,Dim),[Cstatus]=[_discount]) return
COUNTAX(_table2,[Name])

If you still have the problem, please share your sample pbix file.

 

Best Regards,

Lin

Community Support Team _ Lin
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

15 REPLIES 15

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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