The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have a pivot with documents and a slicer on the document date. The pivot contains the document and the respective document date.
My problem: The pivot should be extended by another column - with the maximum selected document date of the slicer. The result is a cross product.
What am I doing wrong? Thank you for your help.
MyMeasure: MaxSliceDocumentDate = maxx(allselected(TimeDoc), TimeDoc[Date Date])
Starting Point:
Result after adding Measure:
Needed Result:
Solved! Go to Solution.
Hello @GeorgWildmoser
i think you just need to add a check
MaxSliceDocumentDate = if(isblank(YourSumMeasure), blank(),maxx(allselected(TimeDoc), TimeDoc[Date Date]))
we could also think on why you are using maxx instead of just max
Let me know if it works
bye
Thanks for the reply from @Gabry , please allow me to provide another insight:
Hi @GeorgWildmoser ,
As far as I know, Power BI automatically omits blank lines and treats blank fingers as zeros after a Sum operation.
Note: Blank lines are automatically omitted if "Show items with no data" is unchecked, but if this option is selected, blank values will also be shown.
In your data there are [DimVo] columns, each row has a separate index, after using [MaxSliceDocumentDate] the expression will be applied to each row, so it will display the value on each row.
If you only want to show columns where [Sum] has a value, you can use the superuser's measure above to determine if [Sum] has a value, and if it does, then [MaxSliceDocumentDate] is displayed, and if it doesn't, then it's blank.
You can also use Filters, select [Sum] -- is not blank
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @GeorgWildmoser
i think you just need to add a check
MaxSliceDocumentDate = if(isblank(YourSumMeasure), blank(),maxx(allselected(TimeDoc), TimeDoc[Date Date]))
we could also think on why you are using maxx instead of just max
Let me know if it works
bye
Hi Gabry,
thank you very much for your support. Your solution works fine.
Your suggested Measure (works great):
Many thanks and have a nice day.
Georg
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
15 | |
13 |
User | Count |
---|---|
38 | |
36 | |
22 | |
21 | |
17 |