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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors