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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

IF condition is not working with Hierarchy

Hi Everyone,

 

As per my requirement, I need to count the login count for each user and reprsent week start date.

To do that I have created a new date columns "Month& Year" and "Week Start Date" & using two columns as hierarchy in matrix.

If user don't have login count on eny week it should represent with "0" instead of blank. It is working with one level hierarchy, but not when I drill down to second level. (or) working when I selected one user , not working when I selected two user.

 

Activity Count =
var  acv = CALCULATE(COUNT(SavedSearch'[Activity]), SavedSearch'[Activity] = "ViewReport")
return
IF(acv<>BLANK(),acv,0)
 

Two users

 

Nishanth1996_0-1664351493488.png

Nishanth1996_1-1664351598248.png

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Simply Try +0

 

CALCULATE(COUNT(SavedSearch'[Activity]), SavedSearch'[Activity] = "ViewReport") +0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you so much for your resonse Amit. I tried with the aproach what you have suggested, but its not working.

Can you please suggest other solutions?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors