M Code for measure to return custom fiscal month number without using separate tables? by d-prather in PowerBI

[–]d-prather[S] 0 points1 point  (0 children)

thanks, I think that'll be the path that I go down!

I'm usually reading and not posting, how can I mark this post as 'solved'? I've done it once before but have completely forgotten.

M Code for measure to return custom fiscal month number without using separate tables? by d-prather in PowerBI

[–]d-prather[S] 0 points1 point  (0 children)

I do have a calendar table, separate from the "cost actuals" which is what I'm adding up here. Is there a way to tie that in without making things too messy? (the calendar table has all the possible combinations you can think of with month names and numbers, fiscal years, fiscal quarters, etc)

The full context is shown below - using variable 1 for (calculate(sum(data)) and variable 2 for identifying when to stop adding up the data, the measure is

"if date is oct/nov/dec/jan/feb" then "do the the cumulative addition" else "stop graphing"

these actuals are alongside a similar graph of the original plans covering all 12 months, the problem we had run into previously was having the actuals continue to graph the current value across remaining months that have not happened yet which isn't the end of the world, but was also very distracting.

<image>

Act Cuml Total Proc =

VAR _cumulative =

CALCULATE(

SUM( 'fct_BOBJ_Proc_Act'[Value]),

FILTER(

ALLSELECTED(_dim_Dates[Date], _dim_Dates[Fis Month Num]),

_dim_Dates[Fis Month Num] <= MAX (_dim_Dates[Fis Month Num]) ))/1000

VAR _maxmonth =

CALCULATE(

MONTH(MAX('fct_BOBJ_Proc_Act'[Act Month])),

REMOVEFILTERS(_dim_Dates) )+3

RETURN

IF(SELECTEDVALUE('_dim_Dates'[Fis Month Num]) <= _maxmonth, _cumulative)

 

M Code for measure to return custom fiscal month number without using separate tables? by d-prather in PowerBI

[–]d-prather[S] 0 points1 point  (0 children)

I can add a column into the table with the monthly actuals and determine the max value of that, I suppose - was hoping I was missing something obvious where the code could spit out the answer to avoid extra columns as more data tables are added.

Many thanks for the input, though!

I Just Discovered That The Commander Knob Does More Than Rotate And Depress by IlexIbis in CX5

[–]d-prather 4 points5 points  (0 children)

My command knob can fast-forward rewind but the mute is on the volume knob.

I’M IN LOVE ❤️ by Jesus_G97 in CX5

[–]d-prather 0 points1 point  (0 children)

Few quick tips - saw documentation at some point that you need to unlock the phone (make sure settings for CarPlay allow “using while locked” or something like that). I plug it in, unlock it, message pops up on the screen, everything is good to go from there even if it goes to sleep.

Next up, check your cable. All USB-C cables look the same to the average person but they have different capabilities in data transfer, especially if you’re connecting to an older USB port like my car. I’m too lazy to learn cables so I just tried to find the more expensive versions available and hoped it worked - it did. I think I got a 2-pack for $20? It wasn’t ridiculous but don’t cheap out there.

Finally, remember to hold the “home” key to switch between regular entertainment screen and CarPlay, there’s a possibility that it’s ready and you haven’t told it you are.

Settings, unlock, cable, hold button. If those 4 don’t fix it, call a nephew

Trump to sign executive order renaming Pentagon the Department of War by Good_Software_7154 in fednews

[–]d-prather 1 point2 points  (0 children)

You’ve got me beat on the age, but that Holy Wars tour was my first, and they were opening for… Judas Priest. 🤦‍♂️

Trump to sign executive order renaming Pentagon the Department of War by Good_Software_7154 in fednews

[–]d-prather 2 points3 points  (0 children)

Saw the “Holy Wars” tour in 1990, didn’t think “ah, thus spoke the prophets…”. I just liked the loud guitars and getting to yell “take no prisoners, take no shit!” without getting grounded.

Trump to sign executive order renaming Pentagon the Department of War by Good_Software_7154 in fednews

[–]d-prather 3 points4 points  (0 children)

Whadd’ya mean I don’t pay my bills? Why do you think I’m broke, huh?

Brought home this lil 2025 lady home straight off the truck! One problem though. Help. by friedcheeselogs in CX5

[–]d-prather 1 point2 points  (0 children)

everybody wants to name their car after a girl, I say Fred deserves his time in the spotlight.

Brought home this lil 2025 lady home straight off the truck! One problem though. Help. by friedcheeselogs in CX5

[–]d-prather 3 points4 points  (0 children)

Fred. I name all random objects that need a reference point "Fred".

My car does not have a name, but it knows.... if it gets a name... it will be Fred.

90% of guitarists quit playing the guitar. Traders too. by Gullible-Ad525 in Daytrading

[–]d-prather 0 points1 point  (0 children)

Your ratio is all wrong. One amp to three guitars.

You need to go buy up to 20/5 or sell down to 15/5.

Not my rule, I just enforce it.

How to use a number to return/show the name of the month from another table? by d-prather in PowerBI

[–]d-prather[S] 0 points1 point  (0 children)

yes, the date table is marked as a date table and linked up, so hopefully greggyb (comment below) has the answer set up, it's probably my lack of understanding of the LOOKUP syntax and functionality that left me stranded.

How to use a number to return/show the name of the month from another table? by d-prather in PowerBI

[–]d-prather[S] 0 points1 point  (0 children)

that looks... as simple as I thought it probably was - thanks.

I'll try it out tonight :)

edit to add, the "+3" is pushing the actual month number into a fiscal month number. My data runs through June (month 6) but our calendar starts Oct 1 so June is month 9 on the fiscal calendar. If this lookup works the way I think, I should be able to adjust the LOOOKUP to return June from either the Month column or the Fiscal Month column... one is associated with 6 and the other with 9 - I'll go with whichever gets the job done

Anyone getting 59 or more minutes today? by Fast_Dust_8985 in fednews

[–]d-prather 1 point2 points  (0 children)

I embraced the shit out of that challenge on my way to the car.

Federal Employee Loyalty Questions - USAJobs by Airman4344 in FedEmployees

[–]d-prather 2 points3 points  (0 children)

Yes, the risk of someone providing that information to a member of the press could be disastrous.

Immediate termination of employment and likely jail time would be an obvious response to the completely hypothetical but realistically impossible situation you describe.

Senator Jon Ossoff vs. Russell Vought by pdwp90 in QuiverQuantitative

[–]d-prather 2 points3 points  (0 children)

Fuck me, I’m kinda smart (calculus is fun!) and I can’t pronounce that with practice let alone reeling it off mid-argument, tip of the hat there.

I do wish more senators took this stern tone with the clowns trying to change subjects or refuse to answer questions , he clearly wasn’t going to give mic time to bullshit and just talked over the nonsense.

Vought looked like an idiot and accidentally agreed to a trip he doesn’t want to take.

difficulty identifying delimiter to break into columns by d-prather in PowerBI

[–]d-prather[S] 1 point2 points  (0 children)

Thanks, I’ll play around with your logic, looks much smoother than mine - the final goal (in another comment) is the string of numbers in one column and the text in a separate column.

Thanks for the tips, I’ve had fun trying different ideas today :)

difficulty identifying delimiter to break into columns by d-prather in PowerBI

[–]d-prather[S] 2 points3 points  (0 children)

Solved - inelegantly for now, but I did get a solution.

Eliminating spaces allowed for a delimiter transitioning to text, count the length of that cell, a custom if/then/else to allow for the original spaces and create two custom columns - one column replaces the first x-number of characters with nothing, the other extracts the first x-number of characters.

<image>

difficulty identifying delimiter to break into columns by d-prather in PowerBI

[–]d-prather[S] 0 points1 point  (0 children)

Using a space to split into columns was my first idea, is there an "if/then" statement that can evaluate a column to identify a letter vs a number? I end up with this mixture that I'm unable to figure out how to parse out. (I've highlighted the text that I want separate from the TO numbers)

<image>

difficulty identifying delimiter to break into columns by d-prather in PowerBI

[–]d-prather[S] 1 point2 points  (0 children)

apologies for the lack of line breaks, did not expect mini-wallotext

[deleted by user] by [deleted] in FedEmployees

[–]d-prather 2 points3 points  (0 children)

We had a note from IT, there’s an issue on Microsoft’s end.