March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
I have a column as 'NAme of the company' & I have created a slicer based on this column.
I have another column as 'secondary company'.
I added a card visual & on that I want to show the count of secondary company that is selected in the slicer.
If I selected company A on slicer & the company A is appearing 10 times in column Secondary company, I want the card to show the count as 10 as company A is available 10 times in 'Secondary company' column.
Solved! Go to Solution.
Hi @harshadrokade ,
Try this measure:
Hi @harshadrokade ,
Not 100% sure if it works but you could try this:
Count =
var Count = CALCULATE(COUNT('Company data'[Secondary company]),ALLEXCEPT('Company data','Company data'[Secondary company]),'Company data'[Secondary company]=SELECTEDVALUE('Company data'[Main company]))
Return
IF(Count=Blank(),"NA",Count)
@jppv20 One more query sir. When I select a single company in slicer, it provides me the count of secondary comnpanies very well but when I select All option in the slicer, it throws (Blank) in the card visual where I used this measure. HOw to edit the measure so that it shows 'NA' when I select All option in slicer
Hi @harshadrokade ,
Not 100% sure if it works but you could try this:
Count =
var Count = CALCULATE(COUNT('Company data'[Secondary company]),ALLEXCEPT('Company data','Company data'[Secondary company]),'Company data'[Secondary company]=SELECTEDVALUE('Company data'[Main company]))
Return
IF(Count=Blank(),"NA",Count)
Hi @jppv20 I can't uplod original data due to restrictions but pls see below example.
See below data. I have single table having two columns as below. I will create a slicer based on Main company column & when I select a company out of it, it should give me count of rows for the same company in column Secondary company.
If I select company A in slicer, the card visual will show count as 4.
If I select company B in slier, the card visual will show count as 2.
Table - Company data
Column - Main company
A
B
C
D
E
D
E
F
Table - Company data
Column - Secondary company
A
A
A
A
B
B
C
C
C
D
D
E
D
E
F
F
F
F
F
G
G
G
G
Hi @harshadrokade ,
Try this measure:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |