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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
PiyushH1
Helper I
Helper I

Change text result in next column

Hi Team,

 

Can anyone help me for my below question ?

 

I have one Excel file which i am taking data in Power bi, my question is if i change any text value in perticular one column then  i should get information in next column that "it'S has been Changed to ***** what ever i updated. see below as Example how i want .

 

Please guide me.

 

Supplier   MESSAGE 

A1            It's has been chnage to V1 from A1

B1            It's has been chnage to L3 from B1

C1            It's has been chnage to K2 from C1

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Great! Glad it worked. Can you mark my answer as solved please?

 

I think you are usually supposed to start a seperate topic for another question but there are a few ways to go about this.

 

https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

 

I have one that is a little more dynamic but you can swap in static dates easily enough:

 

Basic Calendar = CALENDAR((TODAY()-2190),(TODAY()+730))

 

From there, I would advise adding a date table to your reports that use time intellegence, it is very useful. My Fiscal Year runs from April 1 to Mar 31 so you might need to change that one.

 

 
DateTable = 
VAR _minTableDate = MIN ('Basic Calendar'[Date])
VAR _maxTableDate = MAX ( 'Basic Calendar'[Date])
VAR _minDate = IF ( ISBLANK ( _minTableDate ), DATE ( 2018, 1, 1 ), _minTableDate )
VAR _maxDate = IF ( ISBLANK ( _maxTableDate ), DATE ( 2019, 12, 31 ), _maxTableDate )
RETURN
ADDCOLUMNS (
CALENDAR ( _minDate, _maxDate ),
"Year", YEAR ([Date]),
"Fiscal Year", IF(3>= MONTH([Date]),YEAR([Date])-1,YEAR([Date])),
"Date -1", [Date]-1,
"Current Year", YEAR(TODAY()),
"HalfYear", IF ( MONTH ( [Date] ) <= 6, "1st Half", "2nd Half"),
"MonthNumber", MONTH ( [Date] ),
"Current Month", MONTH(TODAY()),
"YearMonthNumber", FORMAT ( [Date], "YYYY.MM" ),
"YearMonthName", FORMAT ( [Date], "YYYY. mmmm" ),
"MonthName", FORMAT ( [Date], "mmmm" ),
"WeekNum", WEEKNUM ( [Date], 2 ),
"CurrentWeek", WEEKNUM (today(), 2 ),
"LastDayofCurrentWeek", CALCULATE(MAX('Basic Calendar'[Date]),WEEKNUM('Basic Calendar'[Date], 2 ) =WEEKNUM(TODAY(),2)),
"DayNum", DAY( [Date] ),
"DayOfWeekNumber", WEEKDAY ( [Date], 2 ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"Current Quarter", "Q" & FORMAT(TODAY(), "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ),
"CurrentYearQuarter", FORMAT ( TODAY(), "YYYY" ) & "/Q" & FORMAT ( TODAY(), "Q" )
)
 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Perhaps a conditional column within the query editor?

 

https://support.office.com/en-us/article/add-a-conditional-column-power-query-f2422ed1-f565-4e64-ba3...

this link is showing excel but I think the same rules apply.

 

Hi Svoves ,

 

thanks for your help.

 

it's working now.

 

also , do you know how can i add dates column in power bi directly which gives me dates from 01/01/2019 till today's date not through excel upload ?

 

Thank you

Anonymous
Not applicable

Great! Glad it worked. Can you mark my answer as solved please?

 

I think you are usually supposed to start a seperate topic for another question but there are a few ways to go about this.

 

https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

 

I have one that is a little more dynamic but you can swap in static dates easily enough:

 

Basic Calendar = CALENDAR((TODAY()-2190),(TODAY()+730))

 

From there, I would advise adding a date table to your reports that use time intellegence, it is very useful. My Fiscal Year runs from April 1 to Mar 31 so you might need to change that one.

 

 
DateTable = 
VAR _minTableDate = MIN ('Basic Calendar'[Date])
VAR _maxTableDate = MAX ( 'Basic Calendar'[Date])
VAR _minDate = IF ( ISBLANK ( _minTableDate ), DATE ( 2018, 1, 1 ), _minTableDate )
VAR _maxDate = IF ( ISBLANK ( _maxTableDate ), DATE ( 2019, 12, 31 ), _maxTableDate )
RETURN
ADDCOLUMNS (
CALENDAR ( _minDate, _maxDate ),
"Year", YEAR ([Date]),
"Fiscal Year", IF(3>= MONTH([Date]),YEAR([Date])-1,YEAR([Date])),
"Date -1", [Date]-1,
"Current Year", YEAR(TODAY()),
"HalfYear", IF ( MONTH ( [Date] ) <= 6, "1st Half", "2nd Half"),
"MonthNumber", MONTH ( [Date] ),
"Current Month", MONTH(TODAY()),
"YearMonthNumber", FORMAT ( [Date], "YYYY.MM" ),
"YearMonthName", FORMAT ( [Date], "YYYY. mmmm" ),
"MonthName", FORMAT ( [Date], "mmmm" ),
"WeekNum", WEEKNUM ( [Date], 2 ),
"CurrentWeek", WEEKNUM (today(), 2 ),
"LastDayofCurrentWeek", CALCULATE(MAX('Basic Calendar'[Date]),WEEKNUM('Basic Calendar'[Date], 2 ) =WEEKNUM(TODAY(),2)),
"DayNum", DAY( [Date] ),
"DayOfWeekNumber", WEEKDAY ( [Date], 2 ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"Current Quarter", "Q" & FORMAT(TODAY(), "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ),
"CurrentYearQuarter", FORMAT ( TODAY(), "YYYY" ) & "/Q" & FORMAT ( TODAY(), "Q" )
)
 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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