POWER BI

Concatinate commnt within same row



https://www.pk-anexcelexpert.com/comparative-analysis-dashboard-in-power-bi/
Tableau Fixed= power bi Allexpext
Scenario1- 


Solution-:Country Sales = VAR A= CALCULATE(Sheet1[Total Sale],ALLEXCEPT(Sheet1,Sheet1[zone]))
                         VAR B= CALCULATE(Sheet1[Total Sale],ALL(Sheet1))
                        RETURN
                            A/B

Rolling 6 and 12 month?

How to split by delimiter in Direct Query Power BI Reports?

http://dataap.org/blog/2020/05/14/how-to-split-by-delimiter-in-direct-query-power-bi-reports/



DAX Fridays! #128: Conditional formatting with DAX - MAX and MIN values in Power BI


https://www.mssqltips.com/sql-server-tip-category/211/power-bi/





Dax time zone issue-:


Pareto = var total= CALCULATE(SUM('Debit Balances'[INVOICE NUMBER]),ALLSELECTED('Debit Balances'))
Var totalinvoicenum= SUM('Debit Balances'[INVOICE NUMBER])
Var Sumtable= SUMMARIZE(ALLSELECTED('Debit Balances'),'Debit Balances'[VENDOR NAME],"Count",SUM('Debit Balances'[INVOICE NUMBER]))
Var cumm= SUMX(FILTER(Sumtable,[Count]>= totalinvoicenum),[Count])
return
DIVIDE(cumm,total,0)




*How can you assign a number (1-4 or 5) to each week of the month In dax?

Week_month = 1 + WEEKNUM ( 'Table'[Date] )-WEEKNUM( STARTOFMONTH ('Table'[Date]))




* Switch function
SWITCH (
    TRUE (),
    [MinutesRounded] < 1, "< 1 minute",
    [MinutesRounded] < 15, "<15 minutes",
    "> 15 minutes" ) 

*Dashboards vs. reports

When would you want to build a dashboard versus a report? The following list explains the key similarities and differences worth noting when you are determining the right path for you:

  • Dashboards can be created from multiple datasets or reports.

  • Dashboards do not have the FilterVisualization, and Fields panes that are in Power BI Desktop, meaning that you can't add new filters and slicers, and you can't make edits.

  • Dashboards can only be a single page, whereas reports can be multiple pages.

  • You can't see the underlying dataset directly in a dashboard, while you can see the dataset in a report under the Data tab in Power BI Desktop.

Both dashboards and reports can be refreshed to show the latest data.

Dashboards allow a user to pin visuals from different reports and datasets onto a single canvas, making it simple to group what's important to the user. Reports, on the other hand, are more focused on being able to visualize and apply transformations to a single dataset. Consider dashboards as the next step that you want to take after building your reports in Power BI Desktop.

Now that you've learned about the background of dashboards and reports, you can learn about dashboards in-depth, specifically about their individual components.

invoice amount vs paid amount 

Spend = IF(
HASONEVALUE('Table'[Column1]),
SWITCH(
VALUES('Table'[Column1]),"Invoice Amount" ,SUM(Append1[INVOICE_AMOUNT (USD)]),
"Paid Amount",SUM(Append1[AMOUNT_PAID (USD)])),
SUM(Append1[AMOUNT_PAID (USD)]))

Sales difference from South, West, or East =

VAR __BASELINE_VALUE =
    CALCULATE(
        SUM('Orders'[Sales]),
        'Orders'[Region] IN { "South", "West", "East" }
    )
VAR __MEASURE_VALUE = SUM('Orders'[Sales])
RETURN
    IF(NOT ISBLANK(__MEASURE_VALUE), __MEASURE_VALUE - __BASELINE_VALUE)


Sales for new Customer ID =

IF(
    ISFILTERED('Orders'[Ship Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    VAR __CURRENT_VALUES = SUMMARIZE(VALUES('Orders'), 'Orders'[Customer ID])
    VAR __EXISTING_VALUES =
        CALCULATETABLE(
            SUMMARIZE(VALUES('Orders'), 'Orders'[Customer ID]),
            FILTER(
                ALL('Orders'[Ship Date].[Date]),
                'Orders'[Ship Date].[Date] < MIN('Orders'[Ship Date].[Date])
            ),
            KEEPFILTERS(__CURRENT_VALUES)
        )
    RETURN
        CALCULATE(
            SUM('Orders'[Sales]),
            EXCEPT(__CURRENT_VALUES, __EXISTING_VALUES)
        )
)

Sales % difference from Furniture =

VAR __BASELINE_VALUE = CALCULATE(SUM('Orders'[Sales]), 'Orders'[Category] IN { "Furniture" })
VAR __MEASURE_VALUE = SUM('Orders'[Sales])
RETURN
    IF(
        NOT ISBLANK(__MEASURE_VALUE),
        DIVIDE(__MEASURE_VALUE - __BASELINE_VALUE, __BASELINE_VALUE)
    )

Sales running total in Category =
CALCULATE(
    SUM('Orders'[Sales]),
    FILTER(
        ALLSELECTED('Orders'[Category]),
        ISONORAFTER('Orders'[Category], MAX('Orders'[Category]), DESC)
    )
)

Total sale-:

Sales total for Category with filter applied=
CALCULATE(SUM('Orders'[Sales]), ALLSELECTED('Orders'[Category]))

Sales total for Category without filter applied =
CALCULATE(SUM('Orders'[Sales]), ALL('Orders'[Category]))

1 comment:

SQL

How to use the  GROUP BY  clause or  ROW_NUMBER()  function to find duplicate values in SQL Server.  The query for finding the duplicate va...