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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to show the total number of records in Clustered Bar Chat?

Hi,

 

I want to show the total number of records in a new bar in Clustered Bar chat? 

 

Data Format:

Company NameCompany Created
test-prod-credentials12/10/2020
reliance-cbheritage6/15/2020
test15/8/2020
listglobally6/15/2020
uatprodtestoctjazlyn12/10/2020
reliance-cascadesir6/15/2020
Realogy Brokerage Group2/27/2020
BrokersTechnology12/11/2019
sss6/11/2020
zx7/31/2020
LuxuryEstate4/29/2020
Vinodtest211/2/2020
Combined Franchise Services4/29/2020
vinathdev111/18/2020
datasync337/22/2020
Spacelist6/2/2020
Cartus8/26/2019

 

As of now, I am able to show the company created in 2019 & 2020. But I wanted to show the total number of companies in a new bar.

vendors.PNG

 

Thanks in advance. 

 
 

 

 

1 ACCEPTED SOLUTION

@Anonymous , You have created a table only with years like

Year = generateseries(2019,2022,1)

 

Do not join with other table use as slicer and axis/row in visual

 

Then create a measure like

measure =
calculate(count(Table[Company Name]), filter(Table, year(Table[Company Created]) >= selectedvalue(Year[Year])))

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Anonymous - Perhaps create a disconnected table with 2019, 2020 and All as rows. Use that in your Axis. You could then create a measure that created a VAR that was MAX of this column. Use that to determine what aggregation to return, either a FILTER'ed set or a count of ALL.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler Thanks for your guidelines. Like, you said, I created a new table where just to have years  & total and their respective count. 

  • Created Year column using this 
    VendorTotal = UNION(DISTINCT(vendor[Company Created].[Year]), ROW("Group Name", "Total")) YearYear
    and then tried to capture the count of respective year and for the total.
     
    Count.PNG
     
    I supposed to pass the year value based on the row, but I am not sure how to pass the year from the "Year" column to get the correct count. Any input would help me.
     
    Thanks in advance.

@Anonymous , You have created a table only with years like

Year = generateseries(2019,2022,1)

 

Do not join with other table use as slicer and axis/row in visual

 

Then create a measure like

measure =
calculate(count(Table[Company Name]), filter(Table, year(Table[Company Created]) >= selectedvalue(Year[Year])))

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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