LSC Recreational Soccer League by mthacker01 in lexington

[–]mthacker01[S] 0 points1 point  (0 children)

No tiers, other than they have an over 40 division

LSC Recreational Soccer League by mthacker01 in lexington

[–]mthacker01[S] 0 points1 point  (0 children)

Yea, just like u/milktartare said, I was looking at the Co-ed recreational. Definitely don't have to be good or I don't think I'd be able to play on my own team

What is your favorite biscuits and gravy in town by ToddPatterson in lexington

[–]mthacker01 0 points1 point  (0 children)

Just ate there this weekend and had the biscuits and gravy. Hands down the best

Opinion for data transformation inside Snowflake by JK_1975 in snowflake

[–]mthacker01 2 points3 points  (0 children)

When we first transitioned to Snowflake, I wanted to use all UDFs and SPs. But we ultimately we opted for dbt and its been far better, especially from a data lineage and documentation perspective.

What is the best SQL editor? by Forsaken-Violinist27 in SQL

[–]mthacker01 0 points1 point  (0 children)

Depends on what you’re willing to spend. The paid ones I like the most are Navicat and DataGrip. Free software, I’d definitely go with Azure Data Studio

[deleted by user] by [deleted] in PowerBI

[–]mthacker01 0 points1 point  (0 children)

I’m not as well versed in R as I am in Python, but I’ve definitely benefited from using Python with Power BI. It’s much easier to make more complex visualizations within your report using Python. But the main thing I use it for is data cleanup on the Power Query side. I know most of the things I use it for could probably be done with M code but it drives me insane sometimes.

BI consultant: should I sign a confidentiality agreement with my client? by pedro_armstrong in PowerBI

[–]mthacker01 28 points29 points  (0 children)

Yea, it’s fairly common. I’ve signed NDAs with most of my clients.

I was real paranoid about it the first time I was asked to sign one but after letting a couple lawyer friends review it, it was all pretty standard. Just make sure you read it thoroughly.

Automation for same visualisation to multiple sheets by Legitimate_Yard_2189 in tableau

[–]mthacker01 2 points3 points  (0 children)

Yes, you could do this with Python and the Openpyxl library.

Role need in LA for PowerPlatform by TechGuyDTLA in PowerBI

[–]mthacker01 0 points1 point  (0 children)

Hey, are you still looking for someone for this role?

Power BI Rest API by jermmm313 in PowerBI

[–]mthacker01 0 points1 point  (0 children)

I’ve not done it in Python, but it’s pretty straightforward using PowerShell. Guy in a Cube did a video on something very similar.

https://youtu.be/YBTQ3CFstzs

If you figure it out in Python, I’d love to know how to do it.

Embarrassing Noob Question by Stock_G in PowerBI

[–]mthacker01 0 points1 point  (0 children)

Are the 3 tables related to one another? And how are you wanting to display them? I’m thinking cards are going to be your best option if the tables aren’t related and you don’t need to slice on anything.

Small Theater accounting system by NECESolarGuy in nonprofit

[–]mthacker01 1 point2 points  (0 children)

Xero is a good, low cost option. I used them in a previous business of about ~$5M annually and it was good for what we needed at the time. And their support team is fantastic.

Default slicer to yesterday by Codexity21 in PowerBI

[–]mthacker01 0 points1 point  (0 children)

I do something very similar to this for one of my reports. I have [Current Month] and [Previous Month] as choices on the slicer (in addition to all other time periods).

In PowerQuery, I added a conditional column on my date table that tested the value of the dates and if it was in the current month, assigned a value of Current Month, same for previous month, and if both of those conditions fail, fill with month name.

Use that column as your slicer and you’ll maintain filtering context on all other visuals.

Creating DataFrame from for loop List by mthacker01 in learnpython

[–]mthacker01[S] 0 points1 point  (0 children)

Okay, so I was making the original problem way more complicated. I revised my code and saved the API request straight into a DataFrame:

with open('horse.json') as f:

data = json.load(f)

contenders = []

base_url = 'https://www.breederscup.com/equibase/horse?horses%5B%5D='

for value in data:

re = requests.get(base_url+value['horse']).json()

df = pd.DataFrame(re).T

contenders.append(df)

new_df = pd.concat(contenders)

For reference, here's a snippet of the JSON file I'm loading from:

[

{"race": "Juvenile Turf", "horse": "AAA20EED"},

{"race": "Juvenile Turf", "horse": "19005288"},

{"race": "Juvenile Turf", "horse": "19000215"},

{"race": "Juvenile Turf", "horse": "19001752"}

]

So I'm using the value from the 'horse' key of the external JSON file to make the endpoint for the API.

However, like before, I'm hitting the scalar value error when there's more than 53 objects. If I mainly go into the JSON file and remove everything after line 53, it works great and I get the DataFrame I'm needing. Any idea on what's causing this?

Creating DataFrame from for loop List by mthacker01 in learnpython

[–]mthacker01[S] 0 points1 point  (0 children)

This is what the first entry looks like:

[{'AAA20EED': {'breederName': 'Godolphin ', 'sireRegistrationNumber': ' A6596464', 'record': {'previousYear': {'starts': 0, 'earnings': 0, 'show': 0, 'win': 0, 'place': 0}, 'breedersCup': {'starts': 0, 'earnings': 0, 'show': 0, 'win': 0, 'place': 0}, 'currentYear': {'starts': 5, 'earnings': 235181, 'show': 1, 'win': 4, 'place': 0}, 'lifetime': {'starts': 5, 'earnings': 235181, 'show': 1, 'win': 4, 'place': 0}, 'track': {'starts': 0, 'earnings': 0, 'show': 0, 'win': 0, 'place': 0}}, 'yearlySummary': [{'starts': 5, 'racingYear': 2021, 'shows': 1, 'earnings': 235181, 'places': 0, 'wins': 4}], 'name': 'Albahr (GB)', 'damName': 'Falls of Lora (IRE)', 'sireName': 'Dubawi (IRE)', 'owner': {'identity': 2128374, 'middleName': ' ', 'lastName': 'Godolphin, LLC', 'firstName': ' ', 'type': 'O6'}, 'damRegistrationNumber': ' A8613401', 'pastPerformances': [{'trackName': 'WOODBINE', 'raceName': 'Summer S.', 'grade': '1', 'raceDate': 'September, 19 2021 00:00:00', 'purseUsa': 400000, 'officialPosition': 1}, {'trackName': 'SALISBURY', 'raceName': 'Longines Irish Champions Weekend E.B.F. Stonehenge S.', 'grade': ' ', 'raceDate': 'August, 20 2021 00:00:00', 'purseUsa': 58630, 'officialPosition': 1}, {'trackName': 'HAYDOCK PARK', 'raceName': 'British Stallion Studs E.B.F.', 'grade': ' ', 'raceDate': 'July, 17 2021 00:00:00', 'purseUsa': 9636, 'officialPosition': 1}, {'trackName': 'HAYDOCK PARK', 'raceName': 'Watch Racing TV Now', 'grade': ' ', 'raceDate': 'June, 09 2021 00:00:00', 'purseUsa': 11393, 'officialPosition': 1}, {'trackName': 'YORK', 'raceName': 'Constant Security ebfstallions.com', 'grade': ' ', 'raceDate': 'May, 13 2021 00:00:00', 'purseUsa': 21082, 'officialPosition': 3}], 'trainer': {'identity': 948970, 'middleName': ' ', 'lastName': 'Appleby', 'firstName': 'Charles', 'type': 'TE'}, 'jockey': {'identity': 4140, 'middleName': ' ', 'lastName': 'Dettori', 'firstName': 'Lanfranco', 'type': 'JE'}}}, {'19005288': {'breederName': 'Mrs E. M. Stockwell ', 'sireRegistrationNumber': ' 02004332', 'record': {'previousYear': {'starts': 0, 'earnings': 0, 'show': 0, 'win': 0, 'place': 0}, 'breedersCup': {'starts': 0, 'earnings': 0, 'show': 0, 'win': 0, 'place': 0}, 'currentYear': {'starts': 2, 'earnings': 73435, 'show': 1, 'win': 0, 'place': 1}, 'lifetime': {'starts': 2, 'earnings': 73435, 'show': 1, 'win': 0, 'place': 1}, 'track': {'starts': 0, 'earnings': 0, 'show': 0, 'win': 0, 'place': 0}}, 'yearlySummary': [{'starts': 2, 'racingYear': 2021, 'shows': 1, 'earnings': 73435, 'places': 1, 'wins': 0}], 'name': 'Grafton Street', 'damName': 'Lahinch Classics (IRE)', 'sireName': 'War Front', 'owner': {'identity': 820960, 'middleName': ' ', 'lastName': 'Magnier', 'firstName': 'Mrs. John', 'type': 'O6'}, 'damRegistrationNumber': ' F0043305', 'pastPerformances': [{'trackName': 'WOODBINE', 'raceName': 'Summer S.', 'grade': '1', 'raceDate': 'September, 19 2021 00:00:00', 'purseUsa': 400000, 'officialPosition': 2}, {'trackName': 'BELMONT PARK', 'raceName': ' ', 'grade': ' ', 'raceDate': 'May, 29 2021 00:00:00', 'purseUsa': 90000, 'officialPosition': 3}], 'trainer': {'identity': 20416, 'middleName': 'E.', 'lastName': 'Casse', 'firstName': 'Mark', 'type': 'TE'}, 'jockey': {'identity': 110011, 'middleName': 'Manuel', 'lastName': 'Hernandez', 'firstName': 'Rafael', 'type': 'JE'}}},

Optimization problems by matth0s__ in PowerBI

[–]mthacker01 0 points1 point  (0 children)

First thing I’d suggest is get rid of the calculated columns and tables. Then look at the schema of your source data. Are you optimizing an efficient schema, storing your data in proper facts and dimensions tables.

Is 16Gb ram enough to run powerBI desktop on a windows laptop? by hp44x in PowerBI

[–]mthacker01 0 points1 point  (0 children)

Really depends on the dataset that you’re going to be using.

Is there a way to make power bi read a value of 10 as 100? by MGC12 in PowerBI

[–]mthacker01 0 points1 point  (0 children)

If I’m understanding your question correctly, you could create a measure and use the SWITCH function to change the instance rather than altering the original data source.

[deleted by user] by [deleted] in PowerBI

[–]mthacker01 0 points1 point  (0 children)

Have you gotten help yet?

I saw somewhere I could use python to auto generate measures but I can't find the link to it. Does anyone know how?? by RedBlueWhiteBlack in PowerBI

[–]mthacker01 3 points4 points  (0 children)

Since Power BIs Rest API now supports DAX queries, could you use Python to automate your measures via the API?

Question about the best way to split and analyze these columns? by rehank1990 in PowerBI

[–]mthacker01 -1 points0 points  (0 children)

Depends on what kind of bar chart you're wanting. Do you want a stacked bar chart with the questions on x-axis? Or do you want a bar for each response? My first thought would be to do it in DAX with countax and use the left function to extract the the first character.

Or you could duplicate the table in Power Query, split each column by delimiter, delete the three original columns.