I have the following table:
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?
Solved! Go to 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] )
@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] )