Power BI Builds 5 - Optical Data

All - a question to the experts on color palette and .json files. I have seen “suggestions” to include up to eight (8) hex codes in your .json file. I only used the five (5) the EDNA colors fan generated, and was later a bit disappointed by the color selections. What is best practice here? And if using the colors fan, are you using the 5 HEX codes generated when you find your primary color then switching a few petals left or right of your primary and collecting those HEX codes also? Etc.

With the fan if you move the circle around by one each time you’ll get different values and hex codes to make up the 8.

We are currently redesigning the app and the colour numbers will go to 10. Probably a month or so away on it

But your right you want to get the full amount

Sam

1 Like

@ChadD,

Personally as a best practice I don’t use the colour fan. I always use an image that has multiple color combinations. I mainly use the Image to colours if using the Enterprise DNA tools. I also posted earlier in this thread regarding @sunip entry regards how I choose my colour them.

Thanks
Jarrett

2 Likes

We’re including more colours here also.

Once we’re done you hopefully won’t need to go anywhere else to get a full palette.

Hopefully not too far away

Sam

4 Likes

Very cool. Thank you, Sam!

Thanks Jarrett, again, for the suggestions and input. I am learning a lot from the forum discussions. Options are good. They say variety is the spice of life.

1 Like

HI Sam,

I know the challenge is over and I am late but I am taking inspiration from your report. Specifically on how to calculate smokers, taking medication and need your help.

Here’s my approach, since there are multiple visits and taking medications can change from no to yes, issmoker from 0 to 1 and vice-versa, so I thought to sum the issmoker column based on the latest appointment date but I am unable to get the result.

Any help is appreciated and great report.

Thanks
Abhi

1 Like

HI Neba,

I know the challenge is over and I am late but I am taking inspiration from your report. Specifically on how to calculate smokers, taking medication and need your help.

Here’s my approach, since there are multiple visits and taking medications can change from no to yes, issmoker from 0 to 1 and vice-versa, so I thought to sum the issmoker column based on the latest appointment date but I am unable to get the result.

Any help is appreciated and great report.

Thanks
Abhi

P.S Reached out to sacrow with the same message. Just wanted to explore what approach are you guys taking.
Thanks again

Hi @Abhi0411,
I never thought a patient might start taking medication or start smoking after a visit. so great observation.
After creating the last appointment date measure, I am sure there are other methods but, my approach for this scenario would be like this:-
Smoker by Last Appt ( or Is taking medication) =
IF(
CALCULATE( [Last Apptmnt. Date] , Appointments[Is Smoker] = 1 ) , “Yes”,
“No” )

Hope this helps.

Regards,
Nebiyu

Thanks,

So I would add a new calculated column and then add this for smokers and other measures count based on last appointment date.

This helps, was loosing sleep over this. And apologies in advance if my approach of adding a new column doesnt make any sense. Still new to DAX, so experimenting with things.

Thanks a ton

The point of completing these challenges is to get better at Dax, analysis and visualizations so no question is silly. The only thing that matters is to get better with time.

When you find changing variables in dataset for challenges like smokers and medications, you can make a reasonable assumption and complete the report.

2 Likes

@Abhi0411
No problem. (BTW We are in the same boat with DAX). But, I don’t think a calculated column for the last appointment date will give you the result you desire because, calculated columns understand row context and each patient might have multiple appointment dates. Therefore, rather than a calculated column, I would create a measure for the last appointment date.

Thanks,

Tried the column didn’t work. Now working on that measure.

Boat might be the same but you would be a captain and I be a sailor. :smiley:

Thanks Again

1 Like

@Abhi0411,

Lol I doubt that. I am sure you will figure it out and google is your best friend when you face this kind of issues. Good Luck.

Nebiyu.

If this can help , I will use EDATE function to to add 3 months 6 months and 12 month per age criteria :First ****Last Date =Calculate(MAX(Opticaldta[App Date], ALLEXCEPT(Opticadta,Opticaldta[Patient Name])) , you need a measure to get patient Age =Value(year(today))-Year(max(opticaldta[DOB]]. now with theses 2 measures it is possible to construct a conditional measure to return the date for recommended appointment … something like this … Rec.App Date=if([patient age]<15),EDATE(Last Date,3),if([patient age]<55,EDATE(Last Date,6),EDATE(Last Date,12))).(like a good old excel nested if statement) . I am sure there are other ways to do this , thought maybe this will give some head start.

1 Like

@Abhi0411

hope you’re well. I added a column into my data set called “latest version”

Latest Version = **
** IF( Opticaldta[Appt Date] = CALCULATE( MAX( Opticaldta[Appt Date] ), **
** ALLEXCEPT( Opticaldta, Opticaldta[Patient Name ] )), **
** “Y”, "N"

)

So anything that returned “Y” was the latest version for that patient. Then I included the above in my calculation for smokers etc

Smoker = CALCULATE( [Clients], <— Clients referencing a distinct count of patients
Opticaldta[IsSmoker] = “Yes”,
Opticaldta[Latest Version] = "Y"
)

I hope this helps. I’m fairly sure there are easier ways to calculate latest version than adding a new column, but it was the best I could think of for this task :slight_smile:

Thanks,

Sam

Wow! Never thought about that. I was trying to create a virtual table by using Summarizecoloumns and then taking patient name and using Last appoinntment date measure but I learnt that I cannot include measures in summarizecolumns. Then I pretty much gave up.

But I like your approach very much. Thanks, this means a lot and help immensely in my learning.

Thanks again

1 Like

Yes, the nested if works fine, but I used the switch — and I think the <15 should be <25 and edate should be 12, and the last edate should be 3. I have always used IF, but it is hard to beat the switch function.

Hi Melissa, your report are so great that I would love to learn the techniques from in order to make a good report like you. I have a question that how did you make the column on ‘LE Change’ and ‘RE Change’?
Thanks,
Jane

Hi Melissa,

How would you edit your interval table to reflect a canine lifespan? I attempted some changes and got negative numbers. So the final product could be 0-5,6-10,11+ or something along those lines. Thanks!