cancel
Showing results for
Did you mean: Anonymous
Not applicable

## Qlik Expression to DAX

HI experts,

Can anyone help me to convert the below Qlik Experssion to DAX. It will be great help. The highlighted Yellow one are the varaibles and explanation for the varaibles are also marked below.

Thank you! 1 ACCEPTED SOLUTION  Community Support

Hi @Anonymous,

You can try to use the following expressions if they are suitable for your requirement:

``````Measure1 =
VAR currDate =
MAX ( Table[Date] )
VAR scaleMil =
SELECTEDVALUE ( Table[scaleMil] )
VAR lable =
SELECTEDVALUE ( Table[scaleMillable] )
RETURN
FORMAT (
INT (
SUMX (
FILTER (
Table,
YEAR ( [Date] ) = YEAR ( currDate )
&& MONTH ( [Date] ) = MONTH ( currDate )
),
[Blance] * [ActualFlag] * [ExchgRate]
) / scaleMil
),
"\$#,##0.0"
) & lable

Measure2 =
IF (
COUNTROWS ( ALLSELECTED ( Table[Column1] ) ) = 1
|| COUNTROWS ( ALLSELECTED ( Table[Column2] ) ) = 1,
1000000,
1000000000
)

Measure3 =
IF (
COUNTROWS ( ALLSELECTED ( Table[Column1] ) ) = 1
|| COUNTROWS ( ALLSELECTED ( Table[Column2] ) ) = 1,
"Mn",
"Bn"
)``````

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
2 REPLIES 2  Community Support

Hi @Anonymous,

You can try to use the following expressions if they are suitable for your requirement:

``````Measure1 =
VAR currDate =
MAX ( Table[Date] )
VAR scaleMil =
SELECTEDVALUE ( Table[scaleMil] )
VAR lable =
SELECTEDVALUE ( Table[scaleMillable] )
RETURN
FORMAT (
INT (
SUMX (
FILTER (
Table,
YEAR ( [Date] ) = YEAR ( currDate )
&& MONTH ( [Date] ) = MONTH ( currDate )
),
[Blance] * [ActualFlag] * [ExchgRate]
) / scaleMil
),
"\$#,##0.0"
) & lable

Measure2 =
IF (
COUNTROWS ( ALLSELECTED ( Table[Column1] ) ) = 1
|| COUNTROWS ( ALLSELECTED ( Table[Column2] ) ) = 1,
1000000,
1000000000
)

Measure3 =
IF (
COUNTROWS ( ALLSELECTED ( Table[Column1] ) ) = 1
|| COUNTROWS ( ALLSELECTED ( Table[Column2] ) ) = 1,
"Mn",
"Bn"
)``````

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.  Super User

@Anonymous , We might not be a Qlik expert. So please provide the requirement.

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

Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!   