The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi! Can someone help me please dedupe this DAX? It is resulting in the sample below. I would like to only see one portion of this text, I do not want it repeated. Please help!
"Received a second merit adjustment to $/hr effective September 2022: Base Year 0: 5.00% Plan Year 1: 5.00% Plan Year 2: 5.00% Plan Year 3: 5.00% Plan Year 4: 5.00% Plan Year 5: 0.00%
Received a second merit adjustment to $/hr effective September 2022: Base Year 0: 5.00% Plan Year 1: 5.00% Plan Year 2: 5.00% Plan Year 3: 5.00% Plan Year 4: 5.00% Plan Year 5: 0.00% $31,862 6,000,120.00 %"
IF (
HASONEVALUE ( 'PayBUDMngrInput'[EMPLOYEE] ),
VAR vrRawTable =
FILTER (
'PayBUDMngrInput',
'PayBUDMngrInput'[RecordType]
IN { "Adjustments to merit", "Adjustments to merit2" }
&& 'PayBUDMngrInput'[IsApproved] = TRUE ()
)
VAR vrTable =
ADDCOLUMNS (
SUMMARIZE (
vrRawTable,
'PayBUDMngrInput'[RecordType],
'PayBUDMngrInput'[AdjustAmount],
'PayBUDMngrInput'[YRMO],
'PayBUDMngrInput'[MeritAdjustBaseYr],
'PayBUDMngrInput'[MeritAdjustPlanYr1],
'PayBUDMngrInput'[MeritAdjustPlanYr2],
'PayBUDMngrInput'[MeritAdjustPlanYr3],
'PayBUDMngrInput'[MeritAdjustPlanYr4],
'PayBUDMngrInput'[MeritAdjustPlanYr5]
),
"DisplayRecord",
IF (
SELECTEDVALUE ( 'PayBUDMngrInput'[RecordType] ) = "Adjustments to merit",
"Received a merit adjustment",
"Received a second merit adjustment"
)
)
RETURN
IF (
COUNTROWS ( vrTable ) > 0,
CONCATENATEX (
vrTable,
[DisplayRecord] & " to "
& FORMAT ( [AdjustAmount], "$###,###/hr" ) & " effective " & [YRMO] & ": "
& UNICHAR ( 10 ) & "Base Year 0: "
& FORMAT ( [MeritAdjustBaseYr], "##0.00%" )
& UNICHAR ( 10 ) & "Plan Year 1: "
& FORMAT ( [MeritAdjustPlanYr1], "##0.00%" )
& UNICHAR ( 10 ) & "Plan Year 2: "
& FORMAT ( [MeritAdjustPlanYr2], "##0.00%" )
& UNICHAR ( 10 ) & "Plan Year 3: "
& FORMAT ( [MeritAdjustPlanYr3], "##0.00%" )
& UNICHAR ( 10 ) & "Plan Year 4: "
& FORMAT ( [MeritAdjustPlanYr4], "##0.00%" )
& UNICHAR ( 10 ) & "Plan Year 5: "
& FORMAT ( [MeritAdjustPlanYr5], "##0.00%" )
& UNICHAR ( 10 )
& UNICHAR ( 10 ),
UNICHAR ( 10 ),
[RecordType], DESC
)
),
IF (
HASONEVALUE ( 'EMPLOYEE'[EMPLOYEE name] ),
"--No Manager Inputs for Employee --",
"--Click on a single Employee--"
)
)
Solved! Go to Solution.
Please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.
Need help uploading data? click here
Want faster answers? click here
Hi @LupinAinsworth ,
Thank you @FBergamaschi , for your response. With a small sample dataset (in text or table format), the model view, and the expected outcome, we will be able to successfully reproduce the issue in Power BI and deliver an effective solution.
Thank you.
Hi @LupinAinsworth ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you,
Tejaswi.
Hi @LupinAinsworth ,
Just checking in have you been able to resolve this issue? If so, it would be greatly appreciated if you could mark the most helpful reply accordingly. This helps other community members quickly find relevant solutions.
Thank you,
Tejaswi.
Please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.
Need help uploading data? click here
Want faster answers? click here
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |