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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Need to convert qlik expression to DAX

Hello Team,

I need to convert the qlik Expression to dax.

 

below is the Qlik Expression 

((AGGR(SUM(Ranking),Company,Month)) /(AGGR(count(MetricName),Company,Month)))*10

 

I have tried converting into DAX but result is not matching.

 

((CALCULATE(SUMX(XLI_Metrics,MAX(X_Metrics[Ranking])),FILTER(X_Metrics,XLI_Metrics[Company]=X_Metrics[Company])))/ (CALCULATE(COUNTX(X_Metrics,MAX(X_Metrics[MetricName])),FILTER(X_Metrics,X_Metrics[Company]=X_Metrics[Company])))*10)

 

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

I’m not much clear about your sample, in my understanding, I create a sample, you can see what is different from yours.

vkalyjmsft_0-1638494181441.png

Measure =
VAR _SUM =
    SUMX (
        FILTER (
            ALL ( 'X_Metrics' ),
            'X_Metrics'[Company] = MAX ( 'X_Metrics'[Company] )
        ),
        'X_Metrics'[Ranking]
    )
VAR _COUNT =
    COUNTROWS (
        FILTER (
            ALL ( 'X_Metrics' ),
            'X_Metrics'[Company] = MAX ( 'X_Metrics'[Company] )
        )
    )
RETURN
    DIVIDE ( _SUM, _COUNT ) * 10

vkalyjmsft_2-1638494343553.png

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

smpa01
Super User
Super User

@Anonymous  please provide sample data and desired ouput.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

Below is the sample data.

 

MetricNameRanking
Average initial response10
Number of cases 10
Time to resolve incident5
User rating per ticket10
Time to receive software10
Time to receive new hardware1
Total work time for onsite field to resolve1
Time to receive new hardware10
Time to create new user account provisioning5

 

 Below is the out put.

 

arif0783_0-1637876070017.png

@smpa01 

@Anonymous I can't comprehend the requirement from the sample data.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.