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
Sohan
Helper III
Helper III

How to use measure in bar chart

I have the following table:

Sohan_0-1626866422664.png

 

Column patientnumber is Converted (Unique)[patientnumber]

Column First date by client has the following DAX code: 

First Date by client = 
CALCULATE(MIN('Geconverteerd (Uniek)'[Datum afspraak]),
    ALLEXCEPT('Geconverteerd (Uniek)', 'Geconverteerd (Uniek)'[Patiëntnummer]))

 

Column First employee has the following DAX code:

First Employee = 
VAR vFirstDate = [First Date by client]
RETURN
CALCULATE(
    MIN('Geconverteerd (Uniek)'[Gebruiker]),
    ALLEXCEPT(
        'Geconverteerd (Uniek)',
        'Geconverteerd (Uniek)'[Patiëntnummer]
    ),
    'Geconverteerd (Uniek)'[Datum afspraak] = vFirstDate
)

 

How can I make the table into a calculated table, so I can use it in charts?

1 ACCEPTED SOLUTION

@Sohan , I need  sample data and sample output in table format? 

 

Try this a new table 

addcolumns(summarize(Table,'Geconverteerd (Uniek)', 'Geconverteerd (Uniek)'[paitentnumber]) ,

"First Date by client" ,[First Date by client], "First Employee" ,[First Employee] )

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Sohan , Above two, are columns?

If not those can me.  and you should be able to use them in visual

 

if not

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

@amitchandak the above two are measures, not calculated columns. I want the image table to be a calculated table, so I can use the data in a visual. 

 

Column 1 (column from calculated table) = Converted (unique) [patient number]

Column 2 = measure with code as above

Column 3 = measure with code as above

@Sohan , I need  sample data and sample output in table format? 

 

Try this a new table 

addcolumns(summarize(Table,'Geconverteerd (Uniek)', 'Geconverteerd (Uniek)'[paitentnumber]) ,

"First Date by client" ,[First Date by client], "First Employee" ,[First Employee] )

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.