Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello All,
It will be very helpful if anyone can help me out to convert this tableau formula to power bi measure.
SUM((FIXED DATEPART('quarter', [Calendar Day)), DATEPART('year', [Calendar Day]): SUM(IF DATEPART('quarter', [Calendar Day]) = DATEPART('quarter', [Current Day MY]-1) and DATEPART('year', [Calendar Day)) DATEPART('year', [Current Day MY]-1) THEN [WORKING DAY YTD] END))).
Thank you in advance for your quick response and valuable time.
Hi @ShyamS
Thanks for the reply from @Greg_Deckler , please allow me to provide another insight:
Here's a DAX formula that should provide the equivalent functionality:
Measure =
VAR CurrentQuarter =
QUARTER ( MAX ( 'Table'[Current Day MY] ) ) - 1
VAR CurrentYear =
YEAR ( MAX ( 'Table'[Current Day MY] ) )
VAR PreviousQuarterEnd =
IF (
CurrentQuarter = 0,
DATE ( CurrentYear - 1, 12, 31 ),
EDATE ( DATE ( CurrentYear, CurrentQuarter * 3, 1 ), -1 )
)
VAR PreviousQuarterStart =
EDATE ( PreviousQuarterEnd, -2 )
RETURN
CALCULATE (
SUM ( 'Table'[WORKING DAY YTD] ),
FILTER (
ALL ( 'Table' ),
'Table'[Calendar Day] >= PreviousQuarterStart
&& 'Table'[Calendar Day] <= PreviousQuarterEnd
)
)
Please note, you might need to adjust the table and column names () to match your actual data model in Power BI.
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@ShyamS Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
15 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
12 |