Wednesday, 16 July 2025

Error Handling in Python

 If you want to catch any type of exception and resume execution, you can use a generic except block:

try:
    # Code that may raise an error
    result = 10 / 0  # This will raise a ZeroDivisionError
except Exception as e:
    # Handle any type of error
    print(f"An error occurred: {e}")
    result = None

# Code to resume execution
print("Continuing with the next part of the code.")

Tuesday, 15 July 2025

Window Functions in SQL

 Problem

I need to rank the rows based on serial number and the serial numbers should be ranked based on the latest inspection date. I have duplicate serial numbers in my data set. How to Achieve.


Solution :

you can use any of the below method to achieve without using Partition

SQL Query - Dense_Rank() over (order by InspectionDate desc, SerialNumber) as row_num

Sunday, 13 July 2025

Automation using AI

 Introduction












Model Context Protocol (MCP)

  •  MCP is used to connect any application on the internet as per our requirments.
  • For this you can use Claud.
  • There is another application named Goose

Saturday, 12 July 2025

Buliding GPTs

  •  You can building custom GPT Application specific to your requirements using prompts.
  • You should include the below structure and more details instructions in order to ger more good results.

  • Similar to GPTs we have Explore Gems in Gemini Which is free to use.





Friday, 11 July 2025

Intro about AI

 



  • A token roughly equals three-fourths of a word, so 100 tokens ≈ 75 words—not an exact 1:1 with words














Thursday, 10 July 2025

Getting data from different tables using measure

 To create a measure in Power BI that retrieves the confirmed_date from table2 based on the ticket_num in table1, you can use DAX (Data Analysis Expressions). Here is a step-by-step guide:

  1. Open Power BI Desktop and load your data tables (table1 and table2).

  2. Create Relationships:

    • Go to the "Model" view.
    • Create a relationship between table1 and table2 using the ticket_num column.
  3. Create a New Measure:

    • Go to the "Report" view.
    • Click on the table1 in the Fields pane.
    • Click on "New Measure" in the ribbon.
  4. Write the DAX Formula:

    • In the formula bar, enter the following DAX formula to create the measure:
Confirmed Date Measure = 
CALCULATE(
    MAX(table2[confirmed_date]),
    FILTER(
        table2,
        table2[ticket_num] = SELECTEDVALUE(table1[ticket_num])
    )
)

This measure does the following:

  • CALCULATE is used to change the context in which the data is evaluated.
  • MAX(table2[confirmed_date]) retrieves the maximum confirmed date from table2. Since table2 has a one-to-many relationship with table1, this will effectively retrieve the confirmed date for the corresponding ticket_num.
  • FILTER(table2, table2[ticket_num] = SELECTEDVALUE(table1[ticket_num])) filters table2 to match the ticket_num from the currently selected row in table1.
  1. Use the Measure:
    • You can now use the Confirmed Date Measure in your reports, tables, or visualizations to display the confirmed date from table2 for each ticket_num in table1.

This approach ensures that the confirmed date from table2 is correctly associated with the corresponding records in table1 based on the ticket_num column.

Wednesday, 9 July 2025

Create Power BI visuals with Python

Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn

AI Websites

Bolt-- https://bolt.new/ -For coding

Cursor--https://cursor.com/ -For coding

For Building Dashboards--https://www.thebricks.com/

Check New AI Tools launch each day -- https://openrouter.ai/

Analyze data in Excel -- https://numerous.ai/

AI tools Explore---https://theresanaiforthat.com/

Converting Image to Text -- https://mistral.ai/news/mistral-ocr

Website create-- https://lovable.dev/?via=global20&gad_source=1

Website create -- https://replit.com/

Upload your file,Start asking questions like a curious 5-year-old

https://auth.julius.ai/


For LinkedIn trending topics--https://app.socialsonic.com/

For LinkedIn posts :-https://www.supergrow.ai/

Interview prepare--https://www.interviewmaster.ai/

Summarize webpage -- https://app.meetemily.ai/onboarding

Chrome Extension-Go Full page ---> To capture the design of website


Meeting transcript recorder -- https://fireflies.ai/


Video & Image Edit -- https://www.krea.ai/

Visual Effects,Edit images (Paid) -- https://higgsfield.ai/

video effects with images -- https://hailuoai.video/

Lip sync --https://app.klingai.com/

Ai for music creators -- https://suno.com/


Create Voice Agents-- https://vapi.ai/

Create Presentation - https://gamma.app/


Download any model and use them in in your personal computer to run the personal data --https://ollama.com/


Agentic web browser -- https://comet.perplexity.ai/


Search for start up companies -- https://www.ycombinator.com/companies


Web Scraping--https://apify.com/


https://v0.dev/

Create social media Post---https://simplified.com/


Create a video with clone of you:- https://www.heygen.com/

Python Packages for Statistical Charts

SeaBorn-- https://seaborn.pydata.org/examples/index.html

Plotly --https://plotly.com/python/

D3-- https://d3js.org/


Tuesday, 1 July 2025

Multiply & divide with One column & one measure

  • Below [RCTQTY] is a column & [Sampling Measure] is a measure
Expected Uploads Measure1 =
SUMX(
    Receipts_SAP,
    Receipts_SAP[RCTQTY] * [Sampling Measure]
)

  • Below [SN_Count] is a column & [Expected Uploads Measure1] is a measure
Upload Percentage =
DIVIDE(SUM(Receipts_LSQD[SN_Count]), [Expected Uploads Measure1])