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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Card Visual Help - Can't Forbid Summarization on Field

I am working on a reporting page for my company's internal on-boarding process. For this particular page, I would like the user to select an employee (via a slicer) and display all the on-boarding tasks assigned to that employee.Blacked out where 'name' goes inBlacked out where 'name' goes inContext on the data: There are three tables in the backend. The table 'Master Task List Admin' contains all the tasks that are a part of the on-boarding process, along with a 'TaskID' column that serves as an identifier. The table 'New Hires' lists all the new employees, along with their emails (which serves as the identifier). The table 'Emp Assigned Tasks' is essentially the "sumproduct" of the two aforementioned tables; whenever a new employee is added to the 'New Hires' table, the contents of 'Master Task List Admin' are duplicated along with the new employee's information from 'New Hires' and appended to the bottom of the 'Emp Assigned Tasks.'

 

I then created a fourth table called "NumCompletedTasks' within Power BI to calculate the number of outstanding and total tasks along with a calculated column for the completion percentage for each employee (one for each row). The code for the table is:

NumCompletedTasks = 
	GROUPBY('Emp Assigned Tasks', 'Emp Assigned Tasks'[Full_Name_String],
		'Emp Assigned Tasks'[Email_OnboardingApp],
		"Number of Completed Tasks", 
		COUNTX(
			CURRENTGROUP(),
			IF('Emp Assigned Tasks'[TaskCompleted]="TRUE",'Emp Assigned Tasks'[TaskCompleted],BLANK())),
        "Number of Total Tasks",
        COUNTAX(
            CURRENTGROUP(),'Emp Assigned Tasks'[TaskCompleted])
    )

 

And the code for the calcualted column is:

PercentCompleted = 
	IF(NumCompletedTasks[Number of Completed Tasks] = 0, 0, DIVIDE(NumCompletedTasks[Number of Completed Tasks],NumCompletedTasks[Number of Total Tasks]))

 

Just as I have a card visual displaying the employee's name, I would like to create a card that displays his/her percentage of completed tasks. However, I can't display the percentage value as something other than a summarization function (i.e. min/max, avg) for the entire percentage column. I have already set the column to "Don't summarize" within 'Modeling'.

 

Should I be creating a measure to work around this? Is there a way to sync that name slicer to a filter applied to the card visual? Or something else I'm not thinking of? Appreciate any and all help.

1 REPLY 1
v-joesh-msft
Solution Sage
Solution Sage

Hi @Anonymous ,

Values in the visual are always aggregated, so you really need to create a measure to achieve the effect you want. You can try the measure below:

PercentCompleted =
IF (
    SUM ( NumCompletedTasks[Number of Completed Tasks] ) = 0,
    0,
    DIVIDE (
        SUM ( NumCompletedTasks[Number of Completed Tasks] ),
        SUM ( NumCompletedTasks[Number of Total Tasks] )
    )
)

If it doesn't work, sample data and expected output would help tremendously.

 

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.