powerbi

Is it possible to use a slicer as a parameter to a DAX Summarize function?

故事扮演 提交于 2019-12-24 06:44:25
问题 I have a FactLosses Table, and a DimAccumulation table. I have brought them into PowerBi and I have placed a slicer to choose which accumulation zones i am interested in. Once the user has selected the zones, i want to perform a group by year on the losses and sum the losses into year buckets. But only on the data that applies to the zones the user picked. I am using the following DAX code to do the group by like so... Table = SUMMARIZECOLUMNS(FactForwardLookingAccumulation[Year], "Losses By

Is it possible to use a slicer as a parameter to a DAX Summarize function?

谁说胖子不能爱 提交于 2019-12-24 06:44:14
问题 I have a FactLosses Table, and a DimAccumulation table. I have brought them into PowerBi and I have placed a slicer to choose which accumulation zones i am interested in. Once the user has selected the zones, i want to perform a group by year on the losses and sum the losses into year buckets. But only on the data that applies to the zones the user picked. I am using the following DAX code to do the group by like so... Table = SUMMARIZECOLUMNS(FactForwardLookingAccumulation[Year], "Losses By

Exclude weekends in PowerBI report?

左心房为你撑大大i 提交于 2019-12-24 06:41:07
问题 I have a burn down chart for our VS Team Services project in Power BI - so that we can report on story points and not effort remaining. In the chart, I have Date on the X axis. Is there a way to filter out weekend dates from the chart? There is no activity on the weekend. I found this forum post, however I didn't understand how to add this to our report. 回答1: Do you have 'day of week' column in your dataset ? If yes, then you can simply add a Report / Page level filter and exclude Saturday

Sumif equivalent in PowerBI doesn't work properly with DAX function

帅比萌擦擦* 提交于 2019-12-24 06:36:47
问题 I try to use SUMIF equivalent in PowerBI. I have read already a lot of similar topics describing the usage of CALCULATE and SUM combined with FILTER functions. But none of them could help me with my problem. What I want to do: A production line writes a time stamp into a CSV file when it starts an event (e.g. machine starts, machine stopps etc.). The CSV file is processed by PowerQuery in a way that all start dates are available in one column of a table. The column is called "Event Start". To

How can I do a customer segmentation for month and see the customer number filtered?

隐身守侯 提交于 2019-12-24 06:29:21
问题 This is the output I would obtain https://i.stack.imgur.com/er8Du.png This is the sample pbix I have done https://mega.nz/#!lg9GASzR!D861nKR8cFGlm4eNyEa2BTep3ku_M5JjktvITAePmQ4 I would obtain the number of customers for each month with the label defined in the measure m-mark = IF([sumlast3months]=3;"Gold"; IF([sumlast3months]=2;"Silver"; IF([sumlast3months]=1;"Bronze"; ;BLANK()))) How can I find new customers in each month? I have thought to find them with a groupby for customerid with the

Power BI Count number of repeating ID

天大地大妈咪最大 提交于 2019-12-24 03:18:45
问题 How do I count repeating ID? I want to put it on the new column, it really doesn't matter if the number of total is repeating example like (if out come is this then better): ==========|= 10327 |2 10327 |2 10328 |3 10328 |3 10328 |3 回答1: Use a calculated column like this: NrOfOccurrences = CALCULATE( COUNT([OrderID]); FILTER(Orders; [OrderID] = EARLIER('Orders'[OrderID]))) From bottom to top: FILTER gives you a table per row that has all rows with the same OrderID COUNT would count the number

Overlapping bar chart with multiple axis in PowerBi

喜你入骨 提交于 2019-12-24 01:37:28
问题 I would like to have a overlapping bar chart in PowerBi with multiple axis. I have an example from Excel which I would prefer to recreate in PowerBi if this is possible. Here the example: Is this possible in PowerBi? Maybe by using a custom visual I don't know off. Thanks in advance, 回答1: Multiple axes? Yes! Overlapping bars? No! Using a Line and Clustered Column Chart is the way to go: Here's a demo using some random numbers: Date A B C 07.08.2018 0,359008828 0,993689927 0,8 08.08.2018 0

Difference between multiple dates in the same column based on category

ⅰ亾dé卋堺 提交于 2019-12-24 01:18:46
问题 I have the following problem .. I have this table: I want to create a calculated column that tells me the difference of days between two dates of the same code ( COD ), the difference should be calculated based on the date before the line. For example: Using COD B COD | DATE | days_diff B |05/01/2018 | B |09/01/2018 | 4 B |12/01/2018 | 3 In the example image the codes / dates are sorted in sequence, but in reality they are out of order. I tried to use the following sentence in DAX: DATEDIFF

How to make a reproducible data sample in PowerBI using Python?

拈花ヽ惹草 提交于 2019-12-23 23:22:03
问题 This is a self-answered post. Why? Because many questions in Power BI go unanswered because of lacking data samples. Also, many seem to wonder how to edit data tables in Power BI using Python. And, of course, the world needs a more wide-spread usage of Python in Power BI. Some think that you have to apply a Python snippet to an existing table loaded elsewhere. My answer to this post will show you how to build a (fairly big) data sample with a few lines of code in an otherwise empty Power BI

How to calculate rank within Sales ranges

牧云@^-^@ 提交于 2019-12-23 22:58:23
问题 How to calculate rank within Category defined on sales level. Say, that we want to label products with Sales above some threshold with Category "high", and below that threshold with Category "low". Here is a sample data. let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcisqzSwpVtJRSiwoyEkF0oZKsTpIwkmJeUAIZJigipfn56QlpRYVVQLZpqhSyRlQcWOweFhqempJYlJOKlgusagovwS7XEF+SWJJPtwJKHL5eZn5eUDaHNUqHI5GdkEsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = (