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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Conversion To DAX

Hi,

Anyone please explain whats the below qlik expression mean and what it is as DAX in powerbi.

 

IF($(vMTDFormula(12))=0,'',$(vMTDFormula(12)))

 

Regards

vamshi

4 REPLIES 4
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you please share about the logic of your $(vMTDFormula(12) fuction?

 

If it is used to calculate the total number of twelve monthes from current month, we create measure use following formula:

 

Measure =
VAR d =
    TODAY ()
VAR result =
    CALCULATE (
        SUM ( InternetSales_USD[SalesAmount_USD] ),
        FILTER (
            ALLSELECTED ( 'DateTime' ),
            AND (
                [DateKey]
                    >= DATE ( YEAR ( d ), MONTH ( d ) - 11, 1 ),
                [DateKey]
                    <= DATE ( YEAR ( d ), MONTH ( d ) + 1, 1 ) - 1
            )
        )
    )
RETURN
    IF ( relust = 0, BLANK (), result )

 

If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-lid-msft F(VALUE(MONTH(MaxDate)))='12' AND CEILING(DAY(MAXDATE/7),1)< CALCULATE(MAX(MaxNumOfPayWeeksInMonth),FILTER(FACT1, FACT1[MONTH] = "12/2019")),
CALCULATE(SUM(MID_MONTH_NET_AMOUNT), FILTER(FACT1, FACT1[MONTH] = "12/2019" && FACT1[WeekNum] = "<=2")),
CALCULATE(SUM(MTD_NET_AMOUNT), FILTER(FACT1, FACT1[MONTH] = "12/2019")))

 

above is MTD Formula(12)

Hi @Anonymous ,

 

Sorry for late reply, but we are not good at qlike formula, could you please kindly share the purpose of this formula? Have you tried the Dax formula we have shared? 


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi

I believe that this is the equivalent to TotalMTD in Power BI

see link for more information:

https://docs.microsoft.com/en-us/dax/totalmtd-function-dax

 

Thank you

Tomas

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.