Forum Discussion
Anonymous
7 years agoNot 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 on...
- 7 years ago
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:
here is new sample pbix file, please try it.
Best Regards,
Lin
- 7 years ago
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
v-lili6-msft
7 years agoCommunity Support
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
Anonymous
7 years agoNot applicable