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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

how to make a condition data column to equal decode date in oracle

Hi,

 

I have issue with my query to not let user enter a input value using a parameter a web browser in power bi server, because this not value in power yet

 

so so sad .

 

in this time i changed a lot of my old code to get this one

I am looking for a hit how to pass Data_g To not from only TO using a Colum in table with decode)

DECODE (c.paytyp, 1, c.CHKDAT_G, 2, c.PAYDAT_G) >'31/12/2018')

like in the pic

data.PNG

SELECT   

         Data_g,

 

         (SUM (NVL (actlon, 0)) + SUM (NVL (fees_paid, 0))

        - SUM (

             NVL (

                (SELECT  SUM (NVL (FEES_PAID, 0))

                   FROM loan50 c

                  WHERE     a.brnoff = c.brnoff

                        AND a.cntno = c.cntno

                        AND c.payflg = 1

                        AND 

                               DECODE (c.paytyp,  1, c.CHKDAT_G,  2, c.PAYDAT_G) >'31/12/2018'

                               ),

                0)))

         Sum_pay

  FROM lon1001 a

 WHERE     a.brnoff = f.brnoff(+)

       AND a.cntno = f.cntno(+)

       AND  a.brnoff = 0100 

       AND Data_g BETWEEN '01/01/2018' AND '31/12/2018'

       GROUP BY  

         Data_g,

 

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


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.
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry for our late reply, but the calculated columns are computed during the database processing and then stored in the model. So In your scenario, we cannot make the calculated column dynamically by the value of slicer.

 

But we can use the measure to calcule the sum usch as following:

 

Measure = Calculate(Sum('Table'[Value]),Filter('Table',Switch([c.paytyp],  1, [c.CHKDAT_G],  2, [c.PAYDAT_G]) >Max('Calendar'[Date])

 

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.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors