0

I have a difference between values returned in Dax studio and Powerbi desktop.

My main table contains records, job id offered date, communication method. These are showing jobs offered to 3rd parties and if they accepted or not.

I am trying to create a dynamic histogram showing how frequent Jobs are offered using a Manual Method.

The job id can and does appear many times

 Job id      date           Method
 1           01/01/2023     Auto
 2           01/01/2023     Manual
 2           02/01/2023     Manual
 2           03/01/2023     Manual
 3           05/01/2023     Manual

as an example, I have written my code in Dax studio and it appears to work fine

DEFINE
MEASURE Vw_LogAssignHistory[Mcount] = SUMX(

VALUES(Vw_LogAssignHistory[JobEntryID]),
Calculate(count(Vw_LogAssignHistory[CreatedBy]),
Vw_LogAssignHistory[CreatedBy] = "Manual"

)
)

 EVALUATE
 GROUPBY(
 SUMMARIZECOLUMNS('Vw_LogAssignHistory'[JobEntryId],"MCount",Convert([Mcount] ,String)  ),
 [Mcount],"Val",COUNTx(CURRENTGROUP(),[Mcount]))

This returns a set of results that shows how many times a number of attemps has been mad ie

attempt      occurrence
      1          10,000
      2           6,000
      3           2,000

When I try and create a virtual table in power bi using the code It creates a table with a single row and the values totalled and they don't total correctly?

I don't understand how this works in dax studio but not power bi

thanks Jason

0 Answers0