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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Bansi008
Helper II
Helper II

Required help in visualization

Hi there,

I am using card visual in the PowerBI visualization pane, and field what I selected is stocks name and converted it into count. since in the foundational table I have records like account level, aggregated value and issuer level along with stocks names, the count value is appearing incorrectly in the visualization. since it is counting account level, aggreagated value and issuer level records as well, despite I have filtered related table only with stocks names and removed these records.

How would I get the correct count of stocks in the card visualization?

1 ACCEPTED SOLUTION
VijayP
Super User
Super User

@Bansi008 

You are using implicit calculation hence this will take all. Filter within power bi Model will not help. It should be filtered out at power query level.

to get the result in power bi model you have to get the count with explicit measure

calculate(count(column), filter(table,column = what you want to see) or <> what you donot want to see




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


View solution in original post

4 REPLIES 4
VijayP
Super User
Super User

@Bansi008  

CALCULATE(
COUNT(tblOutput[Security Issuer Name])
,KEEPFILTERS( 
           NOT tblOutput[Security Issuer Name] IN { "Fund Level" ,"Issuer Level", "aggregated value"))

 

That should work




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Bansi008
Helper II
Helper II

@VijayP thanks Vijay. let me try this solution

VijayP
Super User
Super User

@Bansi008 

You are using implicit calculation hence this will take all. Filter within power bi Model will not help. It should be filtered out at power query level.

to get the result in power bi model you have to get the count with explicit measure

calculate(count(column), filter(table,column = what you want to see) or <> what you donot want to see




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@VijayP In the table view of dashboard, I am using new measure to calculate the count using your formula but seems like it is not correct. Can you please confirm if I am using right syntax.
Can you please help if my syntax is correct or I am making any other mistake.  

New Measure = CALCULATE(COUNT(tblOutput[Security Issuer Name],FILTER(tblOutput,tblOutput[Security Issuer Name]<>Fund Level, Issuer Level, aggregated value)
Bansi008_0-1723014769536.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.