Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi,
Switching form Qliksensen and trying some formulas in PowerbI.
Master table for accounts receivables is able to calculate due date based on the following options. If field month = 0 the due date will calcuated by increasing invocie date (this is in cusomer transaction table) with number of days from field DDAYS (file in customer master tabe. Else end of month form invoice date will be used.
My questions is how would be able to do below formula in PowerBI
Within Qliksense the following formula:
Solved! Go to Solution.
hi @J_aua
You could use this formula to create a column as below:
https://docs.microsoft.com/en-us/dax/eomonth-function-dax
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 0,
'A. Current',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 30,
'B. Below 30',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 45,
'C. 30-45',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 60,
'D. 46-60',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 90,
'E. 61-90',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 180,
'F. 91-180',
'G. Large 180'
)
)
)
)
)
)
Regards,
Lin
hi @J_aua
You could use this formula to create a column as below:
https://docs.microsoft.com/en-us/dax/eomonth-function-dax
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 0,
'A. Current',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 30,
'B. Below 30',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 45,
'C. 30-45',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 60,
'D. 46-60',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 90,
'E. 61-90',
IF (
ROUND (
NOW ()
- (
IF ( [MONTH] = 0, [INVDTE] + [DDAYS], EOMONTH( [INVDTE],0 ) + [MONTH] )
),
-1
) <= 180,
'F. 91-180',
'G. Large 180'
)
)
)
)
)
)
Regards,
Lin
Hello,
I'm no powerBI expert but I think I could help you based on what I've learned so far. Here is a screenshot of what I've done for you:
It's just a single column in a table.
Let me know if this helps!