0% found this document useful (0 votes)
5 views

Power Bi

Uploaded by

aayushs293
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Power Bi

Uploaded by

aayushs293
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

All dates(something) to be seen  Try categorical

Summation  Aggregates

2 data connectivity mode ::


1. Import  It will import the data directly

2. directquery  fetch the data directly each time db is changed

Custom visual  Additional visualization which is downloaded from external website and can be
used(usually done from app store)
Actions  Will work as buttons and helps in navigation of page and other functions

Power query  Brings the data from different sources,Transform


Transform  Delete 1st row if required and see the tool bar for other options

Null data handling  Based on business scenario change and right click and select fill

Split column data in powerbi  select delimiter on Toolbar

Remove space from column after split  select trim

To split first n characters  Slect number of characters in split columns

Combine column  Add column  Custom column 


Conditioned column ::

Append queries as new on tool bar  Append table


Joins ::

Joins  Merge query as new  Issue( Table inside table and how to expand )  2 arrow mark header
click and press ok

Group by  Right click on clumns you wish to use group by on

Age  Add new column,date  age,round it

Make a relationship between tables  Drag and drop the common column

Star Schema  Relation between tables in star format


Date table inside PowerBI ::

Using power query


Bookmark ::

Switch between charts on the same page  Bookmarks  View and then bookmarks  Hide the ones
which you don’t want to view during click and unhide the other one and vice versa

Fr this need a trigger(Button)  action(on) – bookmark  Hide the bookmark by selecting bookmark
going for selection and hiding bookmark

KPI ::

For this use gauge chart/kpi chart(keep a target file to compare0


Disconnected dimension  for an example if the user wants the data and trend till a particular month
with filter,but issue is that it wil show only that particular month mentioned in the filter.this can be
resolved by disconnected dimension.Write below dax query::

How to find top 10(N) products ::

Select filters beside visualization and go for filtering out top N of the quantity

Count ::

Remove column ::
Replace 0 with NULL if chart becomes Flat with 0 at the end

If you want to highlight some values  conditional formatting(right click on filters)

DAX ::
*INSTEaD OF SaLE BELOW MENTION THE TabLE NaME

* Always create separate table for date

It is used to create calculated column/measure

There’s always a aggregator for Measure

Try the above example


Question ::
All location sales1 = CALCULATE( SUM(Data[Selling price]) ,ALL( Data[Location] ))
Question :::

Sales mtd ::

sales quantity MTD = TOTALMTD( SUM(Data[Item quantity]),Data[Sale date].[Date])


Sales qtd ::

sales quantity QTD = TOTALQTD( SUM(Data[Item quantity]),Data[Sale date].[Date])

Sales ytd ::

sales quantity YTD = TOTALYTD( SUM(Data[Item quantity]),Data[Sale date].[Date],”3/31”)

SamePeriodLastyear ::

Same below can be done for prev quarter and year


Dateadd ::
Same can be done for year,month
Datesbetween ::
Need to specify start date and end date
and not relative

Hence need to change -3 to -2 for


coorect
Way to access something in other table use
 Related
Datesinperiod ::

Hasonevalue ::

Its like if else

ALL and ALLEXCEPT ::

It creates a new table for the below

Product ref = ALL ( [product master])

For the below query it will calculate all sales


ALLEXCEPT ::
ignore all the filter on sales except prod category

RANKX ::
TREATAS FUNCTION ::
POWERBI SERVICES ::
Sign in and publish ::

Other way is office 365 to publish dashboard online for easy sharing and it will be stored in workspace
online which is like a space for developersss

Sharing the report to someone  He should also have pro license


Exporting dashboard ::

For embed,export  go to file in powerbi online

Scheduled Refresh(on demand) of data  online and in dataset go to settings

GATeway ::

Why required ::
Row level security ::

Manager  modelling  manage rows  add a filter

Online  Datasets  Security  specify the row level security and specify the email id

WHAT IF :::

Modelling  New parameter(What IF )


Display Custom Messages(use a card for this) ::

Can try for relative dates in filter for better results

CALCULATE ::

CALCULATE(<expression>, <filter1>, <filter2>, ...)

 <expression>: The calculation or measure you want to evaluate.


 <filter1>, <filter2>, ...: One or more filters to apply to the context of the
calculation.

table Sales with columns Region, SalesAmount, and Year. You want to calculate the total sales
for the year 2023.

Formula:
dax
Copy code
Total Sales 2023 = CALCULATE(SUM(Sales[SalesAmount]), Sales[Year] = 2023)

KEEPFILTERS ::

It will keep the filters for other entities and then give the result

Removing the visual headers  Go to file,options and you can remove from there
DIRECT qUERY ::

Adv :: data changing frequently


Import  Bring data

Data query  Go to db and get data

Summarize ::

Create a new table ,

 It allows you to calculate aggregations (like sums, counts, averages) for each group.
 The resulting table exists only in memory and is not stored in your model unless you
explicitly save it using features like calculated tables.

Intersect except ::

You might also like