Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Will try my best to explain what im looking for
So i have a table which has all the information. What im looking for is first to count the number of sold for each employee.
This is what im trying to achieve in the end. A card that tells you how many employees achieved their target for the month selected in the filter at the top of the page.
In our case the month selected is July and B & C are the two employees who achieved their target thus the 2 in the card
Any help appreciated
Thank you
Solved! Go to Solution.
Hi @Anonymous
Here is a sample file with the solution https://we.tl/t-4kHt3LpgmZ
Target Achieved =
VAR T1 =
ADDCOLUMNS (
CROSSJOIN ( VALUES ( Names[Name] ), VALUES ( 'Date'[Month-Year] ) ),
"@CountSold", COUNTROWS ( CALCULATETABLE ( Table1, Table1[Status] = "Sold" ) ),
"@Target", CALCULATE ( SELECTEDVALUE ( Table2[Target] ) )
)
VAR T2 =
FILTER ( T1, [@CountSold] >= [@Target] )
RETURN
COUNTROWS ( T2 )
Please feel free to let me know if you have any question
Hi @Anonymous
Here is a sample file with the solution https://we.tl/t-4kHt3LpgmZ
Target Achieved =
VAR T1 =
ADDCOLUMNS (
CROSSJOIN ( VALUES ( Names[Name] ), VALUES ( 'Date'[Month-Year] ) ),
"@CountSold", COUNTROWS ( CALCULATETABLE ( Table1, Table1[Status] = "Sold" ) ),
"@Target", CALCULATE ( SELECTEDVALUE ( Table2[Target] ) )
)
VAR T2 =
FILTER ( T1, [@CountSold] >= [@Target] )
RETURN
COUNTROWS ( T2 )
Please feel free to let me know if you have any question
@Anonymous , Create a common table like date( using month year column , create date) and name.
and then you can create a measure like
Sold 1= CALCULATE(COUNTROWS(FILTER(Table1,Table1[Status] = "Sold")
Traget 1 = CALCULATE(sum(Table2[Target]))
Countx(filter(Name[Name]), [Sold 1] >= [Target 1] ), [Name])
refer
Hi Amit,
Thank you for your response. I have a measure for Sold and Target just like the dax measure you mentioned in your answer. Can you explain a bit more about the common table?
What columns should i have in the common table?