Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have run into a problem with my measures. I am selftaught and learning each day, so this might be the complete wrong approch to this problem, so if there is a more simple way to archieve this, please feel free to suggest that.
I have 6 cards. 12 measures. First card is a sum of the two cards next to it. Second card is a filtered measure and the third one is also a filtered measure but the direct oppsite of the second one.
First measure:
The top 3 cards are these measures. and the bottom 3 cards, is only using a measure that is countdistinct(Ordernumber) and then I did some visual filters on each one. The result when using the visual filters are correct (there are 4 unique orders with 7 articles, one per row).
I need to somehow, get the values based on the filters, but I also need to be able to get the percent difference between them (which is why I tried to create the measures in the first place). What is not shown here, is that there is a second group of measures that are calculating with fct_MissingArticles'[SDS0001.SRP] = 4, but the measures are identical except for the SRP number and the percent on the first card, is the difference between the first card and the "forth" card that can't be seen in the screenshot.
I hope it makes sense and you are able to support me with this.
Thanks in advance,
B.
Solved! Go to Solution.
Looks like your second and third measure are a repetition of the first one. You can drop the first measure and add the other two where needed.
First measure:
SRP1_total = SRP1_store + SRP1_cdc
Learn about IN { } and NOT IN { } - these can simplify your measures.
Second Measure:
SRP1_store =
CALCULATE(
DISTINCTCOUNT('fct_MissingArticles'[OrderNumber]),
fct_MissingArticles[dim_IsActualShipNodeInv.ShipNodeInv] NOT IN { 31,76 } ,
fct_MissingArticles[SDS0001.SRP] = 1
)
Third measure:
SRP1_cdc =
CALCULATE(
DISTINCTCOUNT('fct_MissingArticles'[OrderNumber]),
('fct_MissingArticles'[dim_IsActualShipNodeInv.ShipNodeInv] IN { 31,76 },
'fct_MissingArticles'[SDS0001.SRP] = 1
)
Looks like your second and third measure are a repetition of the first one. You can drop the first measure and add the other two where needed.
First measure:
SRP1_total = SRP1_store + SRP1_cdc
Learn about IN { } and NOT IN { } - these can simplify your measures.
Second Measure:
SRP1_store =
CALCULATE(
DISTINCTCOUNT('fct_MissingArticles'[OrderNumber]),
fct_MissingArticles[dim_IsActualShipNodeInv.ShipNodeInv] NOT IN { 31,76 } ,
fct_MissingArticles[SDS0001.SRP] = 1
)
Third measure:
SRP1_cdc =
CALCULATE(
DISTINCTCOUNT('fct_MissingArticles'[OrderNumber]),
('fct_MissingArticles'[dim_IsActualShipNodeInv.ShipNodeInv] IN { 31,76 },
'fct_MissingArticles'[SDS0001.SRP] = 1
)
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |